Comments (4)
@youth123-c the download apis are normally async 202 means task submitted. it is actually a success response
you will find the backup file on some other API in UI the javascrip generally take care of this, I don't know which is the second API in case of CVAT but I based of network observation you have to keep hitting same request until you get 201 with param action='download'.
even if you put your request in while with this param I don't thik it will work
I will recommend using the cvat sdk pip install cvat-sdk==2.1.0
https://docs.cvat.ai/docs/api_sdk/sdk/highlevel-api/
here one example
from cvat_sdk import make_client, models
with make_client(host=CVAT_HOST, credentials=(CVAT_USER, CVAT_PASS)) as client:
task_meta = client.tasks.retrieve(download_task_id)
task_meta.export_dataset(format_name="CVAT for images 1.1", filename=local_path)
from cvat.
Thank you very much for your help, I will try it using cvat sdk
from cvat.
Did you sort out how to work with backup API?
from cvat.
def download_annotation(
self,
download_task_id,
account_name,
container_name,
file_format,
):
"""Download annotation with CVAT SDK.
Args:
download_task_id: Task id.
account_name: Azure Blob Storage account name.
container_name: Azure Blob Storage container name.
file_format: Type of annotation file.
CVAT_HOST: CVAT host.
CVAT_USER: CVAT username.
CVAT_PASS: CVAT password.
"""
try:
with make_client(
host=self.request_url, credentials=(self.username, self.password)
) as client:
task_meta = client.tasks.retrieve(download_task_id)
# Get the current date and time
now = datetime.now()
# Format the date and time
dt_string = now.strftime("%y%m%d%H%M%S")
local_path = f"{download_task_id}_{dt_string}.zip"
parsed_url = urlparse(self.request_url)
hostname = parsed_url.hostname.split(".")[0]
blob_path = f"cvat_backup/{hostname}/{download_task_id}/{local_path}"
task_meta.export_dataset(format_name=file_format, filename=local_path)
return True
except Exception as e:
logging.error("Error downloading annotations: %s", str(e))
return False
I used cavt sdk to download the task, but I found that the export_dataset method downloads image and annotation. If I only want to download annotation, I should use that method?
from cvat.
Related Issues (20)
- Share access to task/job via link
- Issue with AI-tools logs in Analytics HOT 1
- Include video source in exported dataset frame name
- Within a task or job, show which images have unresolved issues HOT 2
- using yolo for assisted labeling HOT 1
- Issue annotation creating tasks from mp4 files HOT 3
- Issue with exporting segmentation masks in COCO format HOT 4
- If Docker VM uses wrong CPU Type CVAT does not work after update
- SAM doesn't work HOT 1
- Using connected file share for 3d Data HOT 3
- Mask returned in serverless automatic annotation does not agree with external result HOT 5
- Do not have permission
- UI issues and malfunctions caused by upgrading React and Antd to the latest version HOT 4
- Some issues with UI HOT 4
- Server crash while trying to open a job HOT 4
- Custom img model and metadata (UI) with serveless HOT 2
- CORS issue when trying to connect to API through local host (React app)
- Cannot restore task backup
- Very high consumption of storage for cvat_cvat_cache_db HOT 6
- [GSoC'24] Quality Control: Consensus
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cvat.