Closed WorstCodeWay closed 2 weeks ago
I advise you to move the image files one level earlier, that is, so that the structure is like this:
COCO_dataset/
|-- annotations/
| |-- instances_train.json
| |-- instances_val.json
|-- images/
| |-- image1.jpg
| |-- image2.jpg
| |-- ...
I advise you to move the image files one level earlier, that is, so that the structure is like this:
COCO_dataset/ |-- annotations/ | |-- instances_train.json | |-- instances_val.json |-- images/ | |-- image1.jpg | |-- image2.jpg | |-- ...
@Koldim2001 Thanks for reply.
Yes, that would be a solution, but my data folder structure is generated by cvat (since we claim to support CVAT application), so I think we should convert it to yolov8 format without touching these files and it structure, right?
yes, I agree. Apparently, the storage location of photos depends on the version cvat. My upload in this format looks like in the example. So, as an option, you can separately change the code for your format by forking this repository. It will be useful to have a solution for both versions. 👍🏻 The simplest solution to this problem is to write an automatic transfer of photos to the root of the images folder if they are not located where they should be
yes, I agree. Apparently, the storage location of photos depends on the version cvat. My upload in this format looks like in the example. So, as an option, you can separately change the code for your format by forking this repository. It will be useful to have a solution for both versions. 👍🏻 The simplest solution to this problem is to write an automatic transfer of photos to the root of the images folder if they are not located where they should be
Sounds great. For now, I forked this repository and adapt it to newer version of cvat. For automatic transfer
part, I'll think about it, and let you know if there is some better way to achieve it.
Besides, I've updated my original question in folder structure, there is another sub-folder within Train
named Data
(don't know why cvat
do it this way?)
Anyway, thanks for your nice work!
I assume that if there is a task that is not defined to any of the subtasks such as train validation or test, then it creates a data folder. But I'm not exactly sure. I can hardly tell you.
I assume that if there is a task that is not defined to any of the subtasks such as train validation or test, then it creates a data folder. But I'm not exactly sure. I can hardly tell you.
Not really, it will create a default
installed of train
, validataion
or test
. And thus a default sub-folder
Enviroment
cvat : 2.17.0 (from develop branch) ubuntu : 22.04 COCO_to_YOLOv8 : main
Coco dataset folder
Problem
My guess
Coco dataset has
Train
tag appended to label file(json file, like _instancesTrain.json), and meanwhile images are resided in thatTrain
directory (see Coco dataset folder structure). However, codes here doesn't consider that case and fail.I have a fix, but don't know if it helps?