HumanSignal / HumanSignal/label-studio

Retrieving the project_id and 8 character random string in the path of an uploaded image

Open
#5,487 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

Hello,
When I upload an image to a project in Label Studio and set up the necessary labelling interface, the image has the following naming convention: /data/upload/{project_id}/8_charachter_random_string-image_name. The Label Studio does not provide a custom naming feature for the uploaded images. I want to somehow send a get request to Label Studio API, retrieve the project_id and 8_character_random_string by parsing the content I retrieved. My question is how can I retrieve them (project id and 8_char_random_string) by sending get request to Label Studio API? I cannot see any information in the Label Studio API documentation about this issue, but maybe I am missing somewhere in API docs. Also, my another question is what is the 8 character random string prepended to the image name in the path convention of an uploaded image? Is it an hash value of something? Is this 8 character random string automatically provided by Label Studio to give uniqueness to each uploaded image? I appretiate to get help.
Best regards,
Barış

**Note-0: First of all, if you do not have a Label Studio account, you should create so.**

**Note-1: In order to get the image path, firstly, you should create a project. Then, you should set up the necessary labelling interface. After that, you can upload as many images as you want to this project. You can get the information of the image path from the 'Show task source' part, which is right of each uploaded image.**

**Note-2: You can see the Label Studio API documentation by clicking on the Label Studio Icon, and then the API button/section.**

**Note-3: Since I cannot retrieve the project id and 8 character random string in the path of an image uploaded to a Label Studio project (with an API call), I get the info of 8 character random strings manually from the right of each uploaded image, put them into a list, and do the further operations with each. Since the project id is the same for each image uploaded to the same project, it is easier to get the project id manually, but, I cannot retrieve also the project id via an API call. However, when we have a large number of images (i.e. 5000 images), it will take enormous time to manually copy this many random strings into a list. For now, I should copy each of them, because as I mentioned, the random strings prepended to image names (For further information, please see the image path convention I mentioned above.) are different from each other.**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.