Datumaro with only annotations? #1231
Replies: 2 comments 2 replies
-
Hi @knelson-hme, datumaro/src/datumaro/plugins/data_formats/cvat/base.py Lines 367 to 376 in cce5fc9 There is a file existence check during importing CVAT data format. It requires there exist actual image files in images_dir which isdatumaro/src/datumaro/plugins/data_formats/cvat/base.py Lines 60 to 63 in cce5fc9 To resolve this, you might create a soft directory link or copy-and-paste them to put your images in the right place ( You can refer to the directory structure of CVAT data format here: https://openvinotoolkit.github.io/datumaro/latest/docs/data-formats/formats/cvat.html#import-cvat-dataset Unfortunately, there is currently no functionality to assign Thanks! |
Beta Was this translation helpful? Give feedback.
-
Thank you for taking the time to read and reply to my post. I just want to be clear that my dataset is in Datumaro format and not CVAT when I export it from the CVAT GUI interface. When I run my code I get a problem with the following lines of code: datumaro/src/datumaro/components/dataset_storage.py Lines 259 to 264 in cce5fc9 Where it hits the exception and says
From my understanding this error is happening because I don't have any frame image data saved with my annotations. From your reply it seems like Datumaro requires image frame data to be located with the annotations. Let me explain my original intention to hopefully clear up any confusion. I want to annotate a series of videos that are about 1 hour long each. I import the video into CVAT's GUI and do my annotations. In order to save space I was hoping I could just export the annotations in Datumaro format without also generating a bunch of individual jpeg frames which take up a lot of space. This could be the stupid step, but I then want to use my own python code to load the original video using opencv and also read in the Datumaro dataset annotations (that don't have any explicit image data saved with it) and do some post processing on annotations. My thinking was that I could use opencv to generate the individual frames from the original video file and that these should line up with the Datumaro annotations. I was thinking I could do it this way so I only had to have one copy of the original video without any extra jpeg frames saved to disk. Maybe this approach is flawed and I shouldn't be trying to do it this way. I am curious to know your thoughts. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to use Datumaro with annotations only and no associated image files? I have a fairly large video file I am annotating in CVAT which I then export into Datumaro format without the "Save images" checked in CVAT (I do this because the resulting file exported from CVAT becomes very large if I do). I then want to do some post processing on the annotations, but I run into some issues when I try and run the following simple code:
It seems like the
import_from
method is working but when I try to loop through the dataset I get issues as Datumaro is trying to find an associated image file even though one doesn't exist. When I repeat the same steps above with "Save images" check in CVAT everything works, but this takes a lot of extra time and space to do as it creates a jpg of all my frames.I have been able to loop through my annotations using the following dirty way, but I am sure there has to be a better way.
Beta Was this translation helpful? Give feedback.
All reactions