Open Yobol opened 1 year ago
Using project.export_snapshot_create() gives me RecursionError: maximum recursion depth exceeded. Is anyone else facing this issue?
same issue. How to fix it ?
label-studio
label-studio 1.10.0.post0
label-studio-converter 0.0.33rc5
label-studio-evalme 0.0.18
label-studio-sdk 0.0.32
label-studio-tools 0.0.3
os
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
import time
from label_studio_sdk import Client
def ExportSnapshot(LABEL_STUDIO_URL, API_KEY, PROJECT_ID, SAVE_PATH):
ls = Client(url=LABEL_STUDIO_URL, api_key=API_KEY)
ls.check_connection()
# get existing project
project = ls.get_project(PROJECT_ID)
# get the first tab
views = project.get_views()
task_filter_options = {'view': views[0]['id']} if views else {}
# create new export snapshot
export_result = project.export_snapshot_create(
title='Export SDK Snapshot', task_filter_options=task_filter_options
)
# assert 'id' in export_result
export_id = export_result['id']
# # wait until snapshot is ready
while project.export_snapshot_status(export_id).is_in_progress():
time.sleep(1.0)
# download snapshot file
status, file_name = project.export_snapshot_download(export_id, export_type='JSON', path=SAVE_PATH)
assert status == 200
assert file_name is not None
print(f"Status of the export is {status}.\nFile name is {file_name}")
2. set `LS_UPLOAD_DIR` in `.zshrc` or `.bashrc` and `source ~/.zshrc` or `source ~/.bashrc`
export LS_UPLOAD_DIR=/home/epbox/AI/data/media/upload
3. save **.xml** file of the export project
![image](https://github.com/HumanSignal/label-studio/assets/7224107/307b2e79-0c8b-47f6-ade2-b4c6ef4bb790)
4. use `label-studio-converter` to convert JSON to YOLO format
`pip install label-studio-converter`
label-studio-converter export -i
5. check the convert YOLO **train** folder
(label) ➜ train -h --filelimit=10 --dirsfirst train ├── [ 20K] images [208 entries exceeds filelimit, not opening dir] ├── [ 20K] labels [208 entries exceeds filelimit, not opening dir] ├── [ 124] classes.txt └── [ 840] notes.json
2 directories, 2 files
Hi! I encountered an issue when I use label studio SDK for Python. I use export_snapshot_create & export_snapshot_download to download project task results in type of YOLO as a zipfile, but no image files in it, my code as following:
I successfully downloaded a YOLO annotation result zipfile, but it has no any files in image folder. What parameters can I set to do this?