EscVM/OIDv4_ToolKit

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

Cybernorse opened this issue · 3 comments

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

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

Khan9 commented

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

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.