-
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
Cannot export dataset (KeyError: 'outside') / can't import backup from older version #5971
Comments
Hi, please attach logs from the
What didn't work exactly in the restored project? Please specify. |
Hi @zhiltsov-max, Error: Request failed with status code 500. "Exception: File with meta information can only be uploaded with video/images \n". Maybe this could be relevant, at some point during labelling, the labeller put |
Ok. Yes, the issue might be fixed already in the newer releases. Could you please try to use the backup archive, but without the |
I have tried removing the manifest.jsonl but the issue still remain. This was the error: Could not restore project backup.
Error: Request failed with status code 500. "ValueError: Only one video, archive, pdf, zip or many image, directory can be used simultaneously, but 39 image(s), 0 video(s), 1 archive(s), 0 directory(s), 0 pdf(s), 0 zip(s) found.\n". I have removed all the images from the dataset and attached the project backup zip file here. |
I am able to upload the project backup by removing the 2023-04-06 09:36:13,833 DEBG 'rqworker_default_0' stderr output:
[2023-04-06 09:36:13,833] ERROR cvat.server.task_63: [cvat.apps.dataset_manager.views @ export]: exception occurred
Traceback (most recent call last):
File "/home/django/cvat/apps/dataset_manager/views.py", line 81, in export
export_fn(db_instance.id, temp_file, dst_format,
File "/home/django/cvat/apps/dataset_manager/task.py", line 775, in export_task
task.export(f, exporter, host=server_url, save_images=save_images)
File "/home/django/cvat/apps/dataset_manager/task.py", line 657, in export
exporter(dst_file, task_data, **options)
File "/home/django/cvat/apps/dataset_manager/formats/registry.py", line 37, in __call__
f_or_cls(*args, **kwargs)
File "/home/django/cvat/apps/dataset_manager/formats/coco.py", line 19, in _export
dataset = Dataset.from_extractors(GetCVATDataExtractor(
File "/home/django/cvat/apps/dataset_manager/bindings.py", line 1468, in GetCVATDataExtractor
return CvatTaskOrJobDataExtractor(instance_data, include_images, format_type, dimension)
File "/home/django/cvat/apps/dataset_manager/bindings.py", line 1302, in __init__
for frame_data in instance_data.group_by_frame(include_empty=True):
File "/home/django/cvat/apps/dataset_manager/bindings.py", line 388, in group_by_frame
for shape in sorted(anno_manager.to_shapes(len(self)),
File "/home/django/cvat/apps/dataset_manager/annotation.py", line 164, in to_shapes
return shapes + tracks.to_shapes(end_frame)
File "/home/django/cvat/apps/dataset_manager/annotation.py", line 364, in to_shapes
for shape in TrackManager.get_interpolated_shapes(track, 0, end_frame):
File "/home/django/cvat/apps/dataset_manager/annotation.py", line 762, in get_interpolated_shapes
if not prev_shape["outside"]:
KeyError: 'outside'
2023-04-06 09:36:13,834 DEBG 'rqworker_default_0' stderr output:
ERROR:cvat.server.task_63:[cvat.apps.dataset_manager.views @ export]: exception occurred
Traceback (most recent call last):
File "/home/django/cvat/apps/dataset_manager/views.py", line 81, in export
export_fn(db_instance.id, temp_file, dst_format,
File "/home/django/cvat/apps/dataset_manager/task.py", line 775, in export_task
task.export(f, exporter, host=server_url, save_images=save_images)
File "/home/django/cvat/apps/dataset_manager/task.py", line 657, in export
exporter(dst_file, task_data, **options)
File "/home/django/cvat/apps/dataset_manager/formats/registry.py", line 37, in __call__
f_or_cls(*args, **kwargs)
File "/home/django/cvat/apps/dataset_manager/formats/coco.py", line 19, in _export
dataset = Dataset.from_extractors(GetCVATDataExtractor(
File "/home/django/cvat/apps/dataset_manager/bindings.py", line 1468, in GetCVATDataExtractor
return CvatTaskOrJobDataExtractor(instance_data, include_images, format_type, dimension)
File "/home/django/cvat/apps/dataset_manager/bindings.py", line 1302, in __init__
for frame_data in instance_data.group_by_frame(include_empty=True):
File "/home/django/cvat/apps/dataset_manager/bindings.py", line 388, in group_by_frame
for shape in sorted(anno_manager.to_shapes(len(self)),
File "/home/django/cvat/apps/dataset_manager/annotation.py", line 164, in to_shapes
return shapes + tracks.to_shapes(end_frame)
File "/home/django/cvat/apps/dataset_manager/annotation.py", line 364, in to_shapes
for shape in TrackManager.get_interpolated_shapes(track, 0, end_frame):
File "/home/django/cvat/apps/dataset_manager/annotation.py", line 762, in get_interpolated_shapes
if not prev_shape["outside"]:
KeyError: 'outside'
Any ideas why this happens? |
In my opinion, the |
I see there are several tracks without shapes inside on the frame 25 in the task 1 (in |
Hi @zhiltsov-max, [
{
"version": 0,
"tags": [],
"shapes":["some shapes here"]
"tracks": [] "removed whatever was in here"
}
] [
{
"version": 0,
"tags": [],
"shapes":["some shapes here"] "removed tracks category altogether"
}
] The error message: Error: Request failed with status code 500. "Exception: File with meta information can only be uploaded with video/images \n". |
I have also tried to remove the annotations via the GUI, deleted the image and made a new project export zip file, but these track annotations are still present in the |
Please check this fixed backup archive (no images inside, please put your images into Here are the annotations in COCO format (image names and sizes are different from yours): |
okay, I have been able to export the dataset now in both COCO and YOLO. Thank you for your help. Really appreciate it. I did a silly mistake of not removing the |
Hi |
Hi @zhiltsov-max, |
@Taimourrao, should be fixed in #6204 |
The server part of #6039 - Added support for Ground Truth jobs in a task - Added support for job creation and removal (only Ground Truth jobs can be created or removed in a task) - Added a component to autocompute quality metrics for a task - Added tests - Fixed #5971 (both parts - the outside problem and the manifest problem, the manifest part fix is also available in #6216) Co-authored-by: klakhov <kirill.9992@gmail.com> Co-authored-by: Roman Donchenko <roman@cvat.ai> Co-authored-by: Kirill Sizov <kirill.sizov@cvat.ai>
## \[2.4.7] - 2023-06-16 ### Added - \[API\] API Now supports the creation and removal of Ground Truth jobs. (<#6204>) - \[API\] We've introduced task quality estimation endpoints. (<#6204>) - \[CLI\] An option to select the organization. (<#6317>) ### Fixed - Issues with running serverless models for EXIF-rotated images. (<#6275>) - File uploading issues when using https configuration. (<#6308>) - Dataset export error with `outside` property of tracks. (<#5971>) - Broken logging in the TransT serverless function. (<#6290>) --------- Co-authored-by: Anastasia Yasakova <yasakova_anastasiya@mail.ru> Co-authored-by: Mariia Acoca <39969264+mdacoca@users.noreply.github.com> Co-authored-by: Maxim Zhiltsov <zhiltsov.max35@gmail.com> Co-authored-by: klakhov <kirill.9992@gmail.com> Co-authored-by: Roman Donchenko <roman@cvat.ai> Co-authored-by: Kirill Sizov <kirill.sizov@cvat.ai> Co-authored-by: Boris Sekachev <boris.sekachev@yandex.ru> Co-authored-by: Paweł Kotiuk <kotiuk@zohomail.eu> Co-authored-by: Nikita Manovich <nikita@cvat.ai>
- Fixes the problem with the task mode described in the CVAT corrupts annotations when exported with CVAT for video (#5668) - Fixes the problem with failing backup import because of the manifest file existence from Cannot export dataset (KeyError: 'outside') / can't import backup from older version (#5971) - Cleaned test assets (removed extra directories from unexistent tasks and jobs)
My actions before raising this issue
I have a dataset that got labelled on CVAT version 2.2 specifically this commit db6bbba. The labelling is finished and now when I try exporting the dataset, it gives me the error either,
index out of range
orWork-horse was terminated unexpectedly (waitpid returned 9)
, orError: Request failed with status code 500. "KeyError: 'outside'\n".
I looked at this issue #5600 and thought this may have been fixed in the newer version. I have backed up my projects and tried uploading the project to a version tag of v2.3.0 and v2.4.0. I followed your guide to upgrading from v2.2 to v2.3 from the documents. But the result is stil the same.Steps to Reproduce (for bugs)
I can provide the backed up cvat project zip file (600 MB) that I created using Backup Project or the backup tar.gz files using the CVAT backup guide from the documentation. The project has a validation split which can be exported easily but the training split roughly 150 images is the problem. You can try uploading it to any CVAT version instance from v2.2, v2.3 or v2.4. The export dataset functionality is not working for me.
Expected Behaviour
I expect that CVAT can generate a dataset for me that I can use for training my CNNs.
Current Behaviour
I can restore the projects using backed up files
cvat_data.tar.gz cvat_db.tar.gz
and see the images and labels on GUI. But the exported dataset not working. I also tried restoring via the CVAT project backup zip file but it does not work as either on CVAT 2.4, 2.3.Possible Solution
Should I try migrating my project to a different CVAT version or should i try handpicking with my labels somehow that are faulty maybe? I do not know what could be a potential fix to this.
Context
We are using this dataset for an upcoming research publication on Drone recorded dataset which could be crucial in designing low cost Crop monitoring systems with Drones in Agriculture. It would help alot if i can quickly get access to my labelled dataset in either YOLO or COCO dataset format for my training pipeline.
Your Environment
git log -1
):db6bbbab
on the original machine where data was labelled
tried to reproduce on my local machine with Docker version:
Are you using Docker Swarm or Kubernetes? No
Ubuntu 20.04
I have used CVAT commit db6bbbab for labelling and when the export dataset failed i tried tag version v2.2.0, v2.3.0 and v2.4.0.
I have attached some logs of the
cvat_server
container usingdocker logs cvat_server -f
:cvat_server logs
` * [cvat_server_logs.txt](https://github.com/opencv/cvat/files/11148122/cvat_server_logs.txt)I can provide the backup files for reproducibiltiy in any medium possible. Please let me know whats the fastest method for you. Would help a lot if we can quickly resolve this. Thank you.
The text was updated successfully, but these errors were encountered: