-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I don't know how to read the documentation, please help. #7526
Comments
use intellij idea for using cvat_sdk with python |
Thank you for the advice, but I'm already doing that and it's not helping much. I've been digging into the low-level API code for 2 days and haven't found anything that could help me with this issue. To be honest, an example with code or a link to a similar issue would be very helpful for me. |
I think this code example should be able to help you, from cvat import Dataset, Task Assuming you have a list of image pathsimage_paths = ['image1.jpg', 'image2.jpg', 'image3.jpg', ...] Initialize a datasetdataset = Dataset() Add images to the datasetfor path in image_paths: Create a task with the datasettask = Task(name='My Task', data=dataset) Add annotations to each image (e.g., rectangles with relative coordinates)for data_entry in task.data: Save the tasktask.save('my_task.json') Let me if this works for you and tell me if you need anything else. (I'm commenting this here for easier refence on your behalf I could upload to docs but i need your feedback first.) |
Alright, thank you. |
Change the coordinates of |
Well... from which library specifically is import Dataset, Task, etc. made? And if it's not cvat_sdk, could you provide a link to the library? |
Hi, Please start from the high-level SDK documentation - it begins with a relevant example and provides information on how to perform specific actions. If you want to use lower-level APIs, you should start with this documentation page, which contains an equivalent relevant example. For annotation uploading, please check this structure (for the data structure required) - it's used both in high- and low-level APIs. Please also check SDK tests - there you can find examples for (almost) all high-level APIs provided. Specifically, for the problem you are asking about, these tests should be helpful: task creation, custom annotation uploading and annotation patching. Basically, you're looking for a code like this: from cvat_sdk import make_client
with make_client(...) as client:
task = client.tasks.create_from_data(...)
task.update_annotations({"shapes": [{"type": "rectangle", ...}]}) |
Actions before raising this issue
Is your feature request related to a problem? Please describe.
I don't understand how to use the cvat_sdk for python to create a job or a task... with a hundred images, each of which should have a preliminary annotation (for example, a rectangle with relative coordinates 0.0 0.0 0.5 0.5)
Describe the solution you'd like
Add more example to doc pls...
Describe alternatives you've considered
No response
Additional context
The text was updated successfully, but these errors were encountered: