HumanSignal / HumanSignal/label-studio

How to upload image during task creation?

Open
#7,329 1 comment 0 reactions 0 assignees View on GitHub
community_needs-information
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

**Describe the bug**
I am trying to;
1. Create a Project
2. Create tasks based on the no. of images I have; and UPLOAD IMAGE
3. And, update annotations/predictions for each task

**To Reproduce**
Steps to reproduce the behavior:
```
def create_task_with_yolo_annotations(self, project_id, image_path, yolo_file_path, img_width, img_height):
task = self.ls.tasks.create(project=project_id,
data={"image": image_path})
annotations = yolo_seg_to_labelstudio_results(yolo_file_path, img_width, img_height, {0: "neuron"})

prediction = {
"model_version": "one",
"score": 0.9,
"result": annotations
}
```

**Expected behavior**
I want to be able to upload my images and then assign them to the tasks automatically, using the python sdk.

**Screenshots**
![Image](https://github.com/user-attachments/assets/1a9e2595-56de-4b21-8c26-7cedbe6cce38)

**Environment (please complete the following information):**
- OS: MacOS/Linux
- Label Studio Version [Latest]

![Image](https://github.com/user-attachments/assets/8c0e9874-07a7-4da1-a7d0-2c2acee6d8df)

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.