EscVM / OIDv4_ToolKit

Download and visualize single or multiple classes from the huge Open Images v4 dataset
GNU General Public License v3.0
798 stars 633 forks source link

IndexError: index 0 is out of bounds for axis 0 with size 0 #91

Closed Cybernorse closed 3 years ago

Cybernorse commented 3 years ago

i tried to use this command but it gives me an error below: python3.7 main.py downloader --classes Mobile_Phone --type_csv train --limit 1000

       ___   _____  ______            _    _    
     .'   `.|_   _||_   _ `.         | |  | |   
    /  .-.  \ | |    | | `. \ _   __ | |__| |_  
    | |   | | | |    | |  | |[ \ [  ]|____   _| 
    \  `-'  /_| |_  _| |_.' / \ \/ /     _| |_  
     `.___.'|_____||______.'   \__/     |_____|

         _____                    _                 _             
        (____ \                  | |               | |            
         _   \ \ ___  _ _ _ ____ | | ___   ____  _ | | ____  ____ 
        | |   | / _ \| | | |  _ \| |/ _ \ / _  |/ || |/ _  )/ ___)
        | |__/ / |_| | | | | | | | | |_| ( ( | ( (_| ( (/ /| |    
        |_____/ \___/ \____|_| |_|_|\___/ \_||_|\____|\____)_|    

[INFO] | Downloading Mobile Phone.

Traceback (most recent call last): File "main.py", line 37, in bounding_boxes_images(args, DEFAULT_OID_DIR) File "/home/bigpenguin/predictions and datasets/OIDv4_ToolKit/modules/bounding_boxes.py", line 56, in bounding_boxes_images class_code = df_classes.loc[df_classes[1] == class_name].values[0][0] IndexError: index 0 is out of bounds for axis 0 with size 0

Khan9 commented 3 years ago

I am getting the same error too ..though i have worked with these tool kit previously

Khan9 commented 3 years ago

I think this problem occurs when misspelled or lower case upper case letter mismatch

Cybernorse commented 3 years ago

i have used this code https://drive.google.com/file/d/16oThWx3_JQtaKvT5v9U5MlzpjHRibbBP/view?usp=sharing used in this tutorial https://www.learnopencv.com/fast-image-downloader-for-open-images-v4/ - download the required files from the tutorial as they were too big to share, this worked for me, but it doesn't have any download limit argument. Another solution is to use this chrome extension - fatkun batch download image - to download images from any tab.