feifeiobama / OrthogonalDet

[CVPR 2024] Exploring Orthogonality in Open World Object Detection
33 stars 3 forks source link

AssertionError: Dataset 'my_train' is empty! #6

Closed Melleaa closed 2 months ago

Melleaa commented 2 months ago

Hello!I am a student who recently started learning open-world object detection. I want to know how I should implement moving all images to datasets/JPEGImages and annotations to datasets/Annotations. Specifically, what should the file paths look like in order to resolve this assertion error? Thank you!

feifeiobama commented 2 months ago

You can take a look at step 2 in https://github.com/scuwyh2000/RandBox/blob/main/GETTING_STARTED.md, which may resolve your problem. If the error persists, I will provide more details on how to organize the folder.

Melleaa commented 2 months ago

Thank you for your reply! I try to organize the folder like this: C:\Users\14847\Project\OrthogonalDet-main\datasets\t1\images\train, as same as step 2 of RandBox or C:\Users\14847\Project\OrthogonalDet-main\datasets\JPEGImages\train, as stated in your README.md, then I run the script run_owod.sh under WSL configured with Ubuntu 20.04,but this error still persists in both of these cases. Could you please show me more details? Thank you! Here's the error message: error_info

feifeiobama commented 2 months ago

Sorry I made a mistake earlier. Moving all images to C:\Users\14847\Project\OrthogonalDet-main\datasets\JPEGImages should work fine, see below: https://github.com/feifeiobama/OrthogonalDet/blob/ad8e12b180d87a7d0cda5f30d94aa9538ad8d947/core/pascal_voc.py#L124

wwylvswy commented 2 months ago

This is my directory structure. I created the directory /datasets/JPEGImages myself. image I downloaded the following datasets.

PASCAL2007+2012: trian+val
PASCAL2007 test
COCO2017: train+val

After extracting annotations_trainval2017.zip, I ran coco_to_voc.py to convert it to VOC format. Running the coco_to_voc.py script directly in the project would generate /datasets/Annotations/Annotations, so I modified the targets_path in the code.

# previous
target_folder = "datasets/Annotations" 
# fixed
target_folder = "datasets"

Then extracted PASCAL datasets, and then moved all PASCAL annotation files to /datasets/Annotations. All images should be placed in the /datasets/JPEGImages directory.

Melleaa commented 2 months ago

Thank you for your reply! I forgot to extract PASCAL! After moving all PASCAL images and annotations into datasets/JPEGImages and datasets/Annotations, it works fine! Thank you!