@The AI Guy, Hi. Im having problem using google's Open image dataset v5 to download the dataset. I have been trying this for almost 2 weeks. Just for your information I am in China currently and google was block here. I have change two VPN yet still no result. Everytime download its only downloading less than 20 image. Thus there are alots of images in the website. I need more images. Is there any other way for me to download the dataset. In this case im downloading Helmet and Safety Vest for my project. Or is it possible to help me to download it ( hope it not too much to ask) my email: donaldkimpoua@gmail.com
This video is so underrated. HONESTLY! Whoever has got involved with object detection or whatever, he 'll definitely estimate this. Manual Annotations = MYTH :P
when downloading images by this OID toolkit, if you guys encounter the error about 【aws】, solve it by installing the 【awscli】 package. Because in the function of 【download_img】, aws command was used.
Or install AWS CLI from docs.aws.amazon.com/cli/latest/userguide/install-windows.html in case the requirements are already satisfied when trying to installing it using pip install awscli
@@gauninha12 Thank you so much it helped me, after downloading, one has to copy both aws.exe and aws-scripts.py to "python(installed location in local directories) scripts folder"
do we need to install aws module also? as when I am trying to download using the command which you mentiond its crashing saying aws not found. when I install pip install aws then its crashing. SyntaxError: invalid syntax File "c:\python36\lib unpy.py", line 193, in _run_module_as_main "__main__", mod_spec) ^ print '%(name)s: %(endpoint)s' % { File "C:\Python36\Scripts\aws.exe\__main__.py", line 4, in File "c:\python36\lib unpy.py", line 193, in _run_module_as_main File "C:\Python36\Scripts\aws.exe\__main__.py", line 4, in "__main__", mod_spec) File "c:\python36\lib unpy.py", line 85, in _run_code exec(code, run_globals) SyntaxError: invalid syntax ^ SyntaxError: invalid syntax File "c:\python36\lib unpy.py", line 85, in _run_code SyntaxError: invalid syntax can you tell me how to avoid this problem ??
Cant download many images for some reason it shows found 100-150 images online so downloads that instead of the limit provided. Using same classes as your.
i want to download door handle images . but it gives me error 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 and i think becuse of the space between door handle and if i wrote it doorhandle it still gives me the same error any help??
I was getting an error on your convert_annotation.py file in line 63 saying "index out of range". I dealt with it by changing line 61 to the following line = line.replace(class_type, str(classes.get(class_type))+' ') adding a space is what makes it work.
i am getting an error after i put the python code : "MemoryError: Unable to allocate 55.7 MiB for an array with shape (14610229,) and data type object" , so what should I do
Had the same issue. I think 32-bit Python was causing the issue. What I did to fix it: - Uninstalled 32-bit Python - Installed x64 version 3.8.4 - Created virtual env in project folder: py -m venv env - Since I'm on Windows ran to change execute policy: Set-ExecutionPolicy Unrestricted -Force - Activated env: .\env\Scripts\activate - Installed requirements: pip install pandas numpy awscli urllib3 tqdm opencv-python After that train and validation datasets downloaded without any problems. I'm not 100% sure that it will help you. But it worked for me. Oh, and to check Python version run: py And check output for "64 bit (AMD64)"
While downloading the the csv files initially it downloads only one csv file : 'class-descriptions-boxable.csv'. It doesn't asks for the second file? What is the reason? Here is the error code. I was trying to download images for the vehicle plate detection: [ERROR] | Missing the class-descriptions-boxable.csv file. [94m[DOWNLOAD] | Do you want to download the missing file? [Y/n] [0mY ...145%, 0 MB, 5348 KB/s, 0 seconds passed [DOWNLOAD] | File class-descriptions-boxable.csv downloaded into OID\csv_folder\class-descriptions-boxable.csv. Traceback (most recent call last): File "main.py", line 37, in bounding_boxes_images(args, DEFAULT_OID_DIR) File "F:\dataset download toolkit\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 Please help!
I tried to follow this tutorial and download for "Person" class, but while downloading a message "File association not found for extension .py" keeps on appearing on my screen although in between the images keep getting downloaded. Any possible explanation for the message ?
For some reason I get coordinate data but the images didnt come across using Python 3 on Ubuntu in a VBox VM setup. Video is very helpful but Im just having problems being able to complete tests since the images didnt pull down.
hey I am getting the error File "main.py", line 37, in bounding_boxes_images(args, DEFAULT_OID_DIR) File "D:\Yolo_v3\OIDv4_ToolKit-master\modules\bounding_boxes.py", line 106, in bounding_boxes_images class_dict[class_name] = df_classes.loc[df_classes[1] == class_name].values[0][0] IndexError: index 0 is out of bounds for axis 0 with size 0 can you help me figure this out
Please help me! While downloading the data from that toolkit m constantly getting the message 'aws is not recognized as an external or internal command operable on batch file' i tried everything adding path to system env. But not working.
@@TheAIGuy Weird thing is I am trying on my local machine, I am not sure why this error shows... I followed exactly the same steps in the video. Any help would be appreciated. Thanks!
hey can you tell me how to incorporate the code for a warning message if a detected object is static for more than suppose 5min in the existing code. Please let me know . Have already done detection of baggage for custom data set in a video. Thanks for that.....
After you run the download command with the multiclasses flag, and everything groups in a single folder , what goes into the classes.txt file? all names in a single line? or as you showed it first in separate lines?
Hi I've encountered this problem, (base) PS D:\FYP Prog\OIDv4_ToolKit-master> python convert_annotations.py Currently in subdirectory: train Converting annotations for class: Car 100%|████████████████████████████████████████████████████████████████████████████████| 500/500 [00:16
"MemoryError: Unable to allocate 55.7 MiB for an array with shape (14610229,) and data type object" while downloading balloon I got this error. what it means and what should I do?
i'm getting an error in the convert_annotations.py file (i'm working with license plate detection problem) i know you didn't consider the situation where the name of a class is more than 1 word. but i couldn't fix it. Can u fix it then update the source code for me?
i got this error when execute the convert_annotation.py. My dataset name: Vehicle registration plate Traceback (most recent call last): File "C:\Users\X1 Carbon\Downloads\create-dataset\OIDv4_ToolKit\convert_annotations.py", line 63, in coords = np.asarray([float(labels[1]), float(labels[2]), float(labels[3]), float(labels[4])]) ValueError: could not convert string to float: 'registration'
Hi Sir great video but I am getting this error message - File "main.py", line 20, in From modules.downloader import * ImportError : No module named modules.parser What do I do sir, Please help
you may be using python2 , use python3 when running the downloader: python3 main.py downloader ... (for other missing modules just run pip install each_module)
@@superaluis i am using python 3. got this error:--> Traceback (most recent call last): File "main.py", line 37, in bounding_boxes_images(args, DEFAULT_OID_DIR) File "C:\Rapso\OIDv4_ToolKit\modules\bounding_boxes.py", line 60, in bounding_boxes_images df_val = TTV(csv_dir, name_file, args.yes) File "C:\Rapso\OIDv4_ToolKit\modules\csv_downloader.py", line 21, in TTV df_val = pd.read_csv(CSV) File "C:\Users\Pavan Kumar Sura\AppData\Roaming\Python\Python38\site-packages\pandas\io\parsers.py", line 676, in parser_f return _read(filepath_or_buffer, kwds) File "C:\Users\Pavan Kumar Sura\AppData\Roaming\Python\Python38\site-packages\pandas\io\parsers.py", line 454, in _read data = parser.read(nrows) File "C:\Users\Pavan Kumar Sura\AppData\Roaming\Python\Python38\site-packages\pandas\io\parsers.py", line 1133, in read ret = self._engine.read(nrows) File "C:\Users\Pavan Kumar Sura\AppData\Roaming\Python\Python38\site-packages\pandas\io\parsers.py", line 2037, in read data = self._reader.read(nrows) File "pandas\_libs\parsers.pyx", line 860, in pandas._libs.parsers.TextReader.read File "pandas\_libs\parsers.pyx", line 903, in pandas._libs.parsers.TextReader._read_low_memory File "pandas\_libs\parsers.pyx", line 2104, in pandas._libs.parsers._concatenate_chunks File "", line 5, in concatenate MemoryError: Unable to allocate 55.7 MiB for an array with shape (14610229,) and data type object
@@pavancheyutha3228 Your problem os different. Its a Memory error. If you are running locally maybe your GPU doesn't have enough memory to allocate your batch size...
I need to download images from the Volleyball (Ball) class. Since it includes a parenthesis, I needed to use the character ` to escape it on PowerShell. However, I get this error probably because of the ` character: IndexError: index 0 is out of bounds for axis 0 with size 0 Any idea on how I can fix this?
You said in this video that python is required , so what do i have to download on my pc for that , did you mean anaconda, because i downloaded that and still i'm getting an error when i run the command pip install in the powershell
everything went fine except: when using the convert_annotations.py command, I get the error: " File "convert_annotations.py", line 63, in coords = np.asarray([float(labels[1]), float(labels[2]), float(labels[3]), float(labels[4])]) ValueError: could not convert string to float: 'heels' ." I used the class "High heels" in the Open Image Dataset What should I do ?
oh, I noticed its a problem with the name in the file: "class-descriptions-boxable". after having merged the words with an "_" it worked ! Probably a problem with all descriptions that consist of two words
import os # Folder Path path = "path/something/xyz/folder" search_text="Vehicle registration plate" replace_text="Vehicle_registration_plate" # Change the directory os.chdir(path) # Read text File def read_text_file(file_path): with open(file_path, 'r') as f: data = f.read() data = data.replace(search_text, replace_text) with open(file_path, 'w') as w: w.write(data) print() with open(file_path, 'r') as p: print(p.read()) # iterate through all file for file in os.listdir(): # Check whether file is in text format or not if file.endswith(".txt"): file_path = f"{path}\{file}" # call read text file function read_text_file(file_path)
Hi, thanks for this wonderful tutorial. I have a question, what if I give two classes and one of the downloaded images contain the instances of both classes? Is there a way to generate a .txt label file that inlcude bounding boxes of both classes or just one of them gets generated?
when i am converting the annotations for multiclasses i am not getting the name one hot encoded it remains as a name in the img.txt file, like it remains Apple ,0.55789,.... and not 0,0.55789
I got this error when ran: python convert_annotations.py C:\Users\LENOVO\AppData\Local\Programs\Python\Python310\python.exe: can't open file 'C:\\Users\\LENOVO\\Music\\OIDv4_ToolKit\\convert_annotations.py': [Errno 2] No such file or directory
git is not working and giving error, I have used all the possible ways and installed it but still doesn't show the version and gives error notrecognized git
I have a problem Traceback (most recent call last): File "~\OIDv4_ToolKit\main.py", line 37, in bounding_boxes_images(args, DEFAULT_OID_DIR) File "~\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 How can I fix it? Thank you
After running: python main.py downloader --classes tennis_ball --type_csv train --limit 400 I got the following error: File "C:\Users\bwhit\Desktop\Projects\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 What might I be doing wrong, or what can I do to fix this? Thanks EDIT: I have fixed this issue. I was incorrectly spelling the class name. The class name must be case sensitive and spelled correctly.
So I trained one class, and it works. Now I want to train another class and add it to the 81 classes (COCO + previously trained class) that are already trained, but if I use the yolov3-custom-final.weights file it doesn't work. How do I do this? Thanks!
i have a problem and that is Traceback (most recent call last): File "main.py", line 37, in bounding_boxes_images(args, DEFAULT_OID_DIR) File "C:\Users\User\Desktop\dataset_toolkit\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
I am getting the below error while running the command for downloader [INFO] | Downloading Traffic sign. Traceback (most recent call last): File "C:\OIDv4_ToolKit\modules\downloader.py", line 25, in download columns, rows = os.get_terminal_size(0) OSError: [WinError 6] The handle is invalid Kindly help me in knowing what should I do here
Hi , I am getting "MemoryError: Unable to allocate 1.00 MiB for an array with shape (131072,) and data type int64". I spent almost a day to find a solution but no luck. Plz help. Thanks in advance :)
Great tutorial. Congratulations!! I have a dataset with 500 images of water consumption meters. Everything labeled. If someone has been working with similar projects I can send this file.
coords = np.asarray([float(labels[1]), float(labels[2]), float(labels[3]), float(labels[4])]) ValueError: could not convert string to float: 'opener' How to deal with this?
Hi, Thanks for the video. I wanted to check 2 classes which i have downloaded in the same folder using -multiclass -1. When i run python convert_annotations.py i get an error so how do i mention this 2 class names in classes.txt ?
@The AI Guy hi, I got this: Unable to allocate 55.7 MiB for an array with shape and data type object I used Balloon and Orange images. The folder OID its ok but when I go to label there is no image. Could you help me or what should I do. Thanks in advance.
Hi AI Guy, Thanks for such a great Input But there is error in your code of - convert_annotations.py Instead of converting class as 0,1,2 in each txt file it is converting to 3B3a3l3l3o3o3n3 for ballon 3W3o3m3an for woman..and so on..
HI , GUYS I MYSELF SOLVED IT. actually be very carefull of not giving any extra spaces in classes.txt . By mistake I gave extra space after writing my classes in classes.txt
@@navalsheth hy same error i am facing , i have class name as Human Face so what to do , i have tried different combinations but still no progress . On keering it Human face label is like 202 . I m using single class
Hello! I have another question! Could someone try to explain to me how I could "merge" my own images and labels with the ones obtained using the OID toolkit. For instance, I want to add a category that is not present in the OpenImages dataset, and so I would have to gather my own images and annotate them, but how could i mix them and convert the annotations to the proper format alongside the others obtained with OID? Thanks!
Hey there, I recommend using the tool called labelImg and I actually have a video already on it. Check it out, it will show you how to draw labels on your own images. Hope this helps.
hi thanks for your helpful videos.. especially for this! i 'm doing this but i want to adjust another images not in openimagedata, for this, should i use first 'labelImg' to box , and then convert those label datas to yolo label data using 'convert annotaions.py'??
labelImg creates the labels in the proper format as long as within labelImg you have it set to YOLO and not VOC or Pascal. So there is no need for you to use convert script on labelImg labels! WOOHOO
Can you help me out? I'm getting this error Traceback (most recent call last): File "E:\OIDv4_ToolKit\modules\downloader.py", line 25, in download columns, rows = os.get_terminal_size(0) OSError: [WinError 6] The handle is invalid During handling of the above exception, another exception occurred: Traceback (most recent call last): File "main.py", line 37, in bounding_boxes_images(args, DEFAULT_OID_DIR) File "E:\OIDv4_ToolKit\modules\bounding_boxes.py", line 62, in bounding_boxes_images download(args, df_val, folder[0], dataset_dir, class_name, class_code) File "E:\OIDv4_ToolKit\modules\downloader.py", line 27, in download columns, rows = os.get_terminal_size(1) OSError: [WinError 6] The handle is invalid
Hey there, I followed the step until : python convert_annotations.py, but it shows Error: C:\Users\Peter Cham\AppData\Local\Programs\Python\Python38-32\python.exe: can't open file 'convert_annotations.py': [Errno 2] No such file or directory Can anyone help me? Thank you in advance
I am facing an issue and it says Traceback (most recent call last): File "C:\Users\OIDv4_ToolKit\main.py", line 37, in bounding_boxes_images(args, DEFAULT_OID_DIR) File "C:\Users\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 can someone help me out?
git : The term 'git' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + git clone github.com/theAIGuysCode/OIDv4_ToolKit.git + ~~~ + CategoryInfo : ObjectNotFound: (git:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException I have this error when I am in 3.49 , anyone can help me?
how to resize these images with xmin xmax values ??? i am doing object detection with tensorflow object detection api i want to resize these images in 800x600
to resize images you should write a script that used the built in resize functions from either opencv (cv2) or pillow! Both can easily be done but are not done with the toolkit.
@@TheAIGuy i can resize all the images easily , problem is how to resize min max values??? min max values will changed if i resize a image .. am i right ?
Hey, I was following your videos for a while and let me tell you are doing a great job I was trying to make a custom dataset and followed the instructions that you specified but the images are not downloading and I am getting this error:- aws' is not recognized as an internal or external command, operable program or batch file. Can you please guide me to solve this issue please do reply as I am waiting for it
there is no Person class on class-descriptions-boxable.csv file....,how can i mention person class on that file....and u downloaded Balloon dataset...I think so it is working becuase their is a Balloon class on class-descriptions-boxable.csv file.....i placed Person instead of Balloon....that dataset is downloaded but couldn't shows on train folder...y becuase thier is no person class on class-descriptions-boxable.csv file....so finally my problem is how add person class to class-descriptions-boxable.csv file
Hi, I'm getting an error in PowerShell "D:\Images\OIDv4_ToolKit> pip install -r requirements.txt pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + pip install -r requirements.txt + ~~~ + CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException"
Let me know if you guys have any issues that I can help with! Also let me know which videos you want to see in future. 🤓
I want to see on train dataset
please make a playlist of object recognition.
will do!
@The AI Guy, Hi. Im having problem using google's Open image dataset v5 to download the dataset. I have been trying this for almost 2 weeks. Just for your information I am in China currently and google was block here. I have change two VPN yet still no result. Everytime download its only downloading less than 20 image. Thus there are alots of images in the website. I need more images. Is there any other way for me to download the dataset. In this case im downloading Helmet and Safety Vest for my project. Or is it possible to help me to download it ( hope it not too much to ask) my email: donaldkimpoua@gmail.com
@Shubham Kumar hey shubham .. i am also having the same problem... were u able to solve it? if yes ..the pls let me know
This video is so underrated. HONESTLY! Whoever has got involved with object detection or whatever, he 'll definitely estimate this. Manual Annotations = MYTH :P
Ur video are helping millions of student to complete their college projects.
Thanks for ur feedback and support.
Thanks so much. Glad you enjoy
when downloading images by this OID toolkit, if you guys encounter the error about 【aws】, solve it by installing the 【awscli】 package. Because in the function of 【download_img】, aws command was used.
Or install AWS CLI from docs.aws.amazon.com/cli/latest/userguide/install-windows.html in case the requirements are already satisfied when trying to installing it using pip install awscli
@@gauninha12 Thank you so much it helped me, after downloading, one has to copy both aws.exe and aws-scripts.py to "python(installed location in local directories) scripts folder"
Not able to install the awscli package through conda install. Pls let me know some other method.
Please can you explain more, because I couldn't find a solution.
My guy, I don't know how to thank you enough. You're my idol now
I think the best video series about YOLOv3. Thank you so much. I expect your new videos. :)
Thanks for video. The first video about darknet helped me so much on my final project also this video looks very helpful. Keep it up
do we need to install aws module also? as when I am trying to download using the command which you mentiond its crashing saying aws not found. when I install pip install aws then its crashing.
SyntaxError: invalid syntax
File "c:\python36\lib
unpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
^
print '%(name)s: %(endpoint)s' % {
File "C:\Python36\Scripts\aws.exe\__main__.py", line 4, in
File "c:\python36\lib
unpy.py", line 193, in _run_module_as_main
File "C:\Python36\Scripts\aws.exe\__main__.py", line 4, in
"__main__", mod_spec)
File "c:\python36\lib
unpy.py", line 85, in _run_code
exec(code, run_globals)
SyntaxError: invalid syntax
^
SyntaxError: invalid syntax
File "c:\python36\lib
unpy.py", line 85, in _run_code
SyntaxError: invalid syntax
can you tell me how to avoid this problem ??
Hey, have u found a solution? I'm having the same issue
Cant download many images for some reason it shows found 100-150 images online so downloads that instead of the limit provided. Using same classes as your.
i want to download door handle images . but it gives me error
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
and i think becuse of the space between door handle and if i wrote it doorhandle it still gives me the same error
any help??
its due to the spelling mistake because alphabet cases also matters
Thanks for the video. That helps me a lot about implementing the image detection on my research topic! XD
I hope more videos would come out shortly.
I was getting an error on your convert_annotation.py file in line 63 saying "index out of range".
I dealt with it by changing line 61 to the following
line = line.replace(class_type, str(classes.get(class_type))+' ')
adding a space is what makes it work.
Thanks for pointing this out. I greatly appreciate it. All the best!
i am getting an error after i put the python code : "MemoryError: Unable to allocate 55.7 MiB for an array with shape (14610229,) and data type object" , so what should I do
@@illuminaticat4861 Wow thanks a lot this worked hahas! Was a little hard to understand at first but i followed line by line slowly and it worked :)
Had the same issue. I think 32-bit Python was causing the issue. What I did to fix it:
- Uninstalled 32-bit Python
- Installed x64 version 3.8.4
- Created virtual env in project folder: py -m venv env
- Since I'm on Windows ran to change execute policy: Set-ExecutionPolicy Unrestricted -Force
- Activated env: .\env\Scripts\activate
- Installed requirements: pip install pandas numpy awscli urllib3 tqdm opencv-python
After that train and validation datasets downloaded without any problems. I'm not 100% sure that it will help you. But it worked for me.
Oh, and to check Python version run: py
And check output for "64 bit (AMD64)"
install 64 bit python 3.8
While downloading the the csv files initially it downloads only one csv file : 'class-descriptions-boxable.csv'. It doesn't asks for the second file? What is the reason?
Here is the error code. I was trying to download images for the vehicle plate detection:
[ERROR] | Missing the class-descriptions-boxable.csv file.
[94m[DOWNLOAD] | Do you want to download the missing file? [Y/n] [0mY
...145%, 0 MB, 5348 KB/s, 0 seconds passed
[DOWNLOAD] | File class-descriptions-boxable.csv downloaded into OID\csv_folder\class-descriptions-boxable.csv.
Traceback (most recent call last):
File "main.py", line 37, in
bounding_boxes_images(args, DEFAULT_OID_DIR)
File "F:\dataset download toolkit\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
Please help!
I also have the same problem! did you find any solution for this one?
I tried to follow this tutorial and download for "Person" class, but while downloading a message "File association not found for extension .py" keeps on appearing on my screen although in between the images keep getting downloaded. Any possible explanation for the message ?
i am in love with all your videos... thanks so much!
For some reason I get coordinate data but the images didnt come across using Python 3 on Ubuntu in a VBox VM setup. Video is very helpful but Im just having problems being able to complete tests since the images didnt pull down.
hey I am getting the error File "main.py", line 37, in
bounding_boxes_images(args, DEFAULT_OID_DIR)
File "D:\Yolo_v3\OIDv4_ToolKit-master\modules\bounding_boxes.py", line 106, in bounding_boxes_images
class_dict[class_name] = df_classes.loc[df_classes[1] == class_name].values[0][0]
IndexError: index 0 is out of bounds for axis 0 with size 0
can you help me figure this out
You have to use "Windows Powershell" not "Git Bash" or "windows cmd"
Please help me!
While downloading the data from that toolkit m constantly getting the message 'aws is not recognized as an external or internal command operable on batch file' i tried everything adding path to system env. But not working.
are you attempting this on aws cloud?
getting the same error here
@@TheAIGuy Weird thing is I am trying on my local machine, I am not sure why this error shows... I followed exactly the same steps in the video. Any help would be appreciated. Thanks!
@Tina w do u have anaconda prompt installed on ur pc downloading from their rectified my problem.
@@sushantshrivastava3496 i am trying it in anaconda promtp but i am still geting the same error
hey can you tell me how to incorporate the code for a warning message if a detected object is static for more than suppose 5min in the existing code. Please let me know . Have already done detection of baggage for custom data set in a video. Thanks for that.....
Very good explained, thanks)
Will wait new videos
After you run the download command with the multiclasses flag, and everything groups in a single folder , what goes into the classes.txt file? all names in a single line? or as you showed it first in separate lines?
Hi I've encountered this problem,
(base) PS D:\FYP Prog\OIDv4_ToolKit-master> python convert_annotations.py
Currently in subdirectory: train
Converting annotations for class: Car
100%|████████████████████████████████████████████████████████████████████████████████| 500/500 [00:16
"MemoryError: Unable to allocate 55.7 MiB for an array with shape (14610229,) and data type object" while downloading balloon I got this error. what it means and what should I do?
f
I had the same thing as you, but it works when i tried to download other classes like car and bus, i don't why !
@Pavan Cheyutha hi did you fix it?
@@nept4ne No, I could not fix it, I created data set manually, Do you have solution?
@@pavancheyutha3228 No :( I'm still trying to figure out what to do and when you created the data set manually it worked?
it is not working for the commands you are showing at the beginning . it is about powershel ı guess can you tell me whats the problem
Starting of the video when I enter the copy code in the power shell it shows that the term git is not recognised as the name of a cmdlet ...........
loved it! good work man
i'm getting an error in the convert_annotations.py file (i'm working with license plate detection problem)
i know you didn't consider the situation where the name of a class is more than 1 word. but i couldn't fix it. Can u fix it then update the source code for me?
Great vid, going to follow along with the tutorials
you are the Best!!! thank you for your great video
Glad you enjoyed! Thanks for the kind words.
How about segmentation i searched allover the net for tool to download the masks but failed!
this is the issue for ambulance calss
[ERROR] | Missing the class-descriptions-boxable.csv file.
i got this error when execute the convert_annotation.py. My dataset name: Vehicle registration plate
Traceback (most recent call last):
File "C:\Users\X1 Carbon\Downloads\create-dataset\OIDv4_ToolKit\convert_annotations.py", line 63, in
coords = np.asarray([float(labels[1]), float(labels[2]), float(labels[3]), float(labels[4])])
ValueError: could not convert string to float: 'registration'
Hi Sir great video but I am getting this error message -
File "main.py", line 20, in
From modules.downloader import *
ImportError : No module named modules.parser
What do I do sir, Please help
How did you solve it?I ran into the same problem...Help!
just type "pipX install module" where X is the python version you're using might be 2 or 3
you may be using python2 , use python3 when running the downloader: python3 main.py downloader ... (for other missing modules just run pip install each_module)
@@superaluis i am using python 3.
got this error:-->
Traceback (most recent call last):
File "main.py", line 37, in
bounding_boxes_images(args, DEFAULT_OID_DIR)
File "C:\Rapso\OIDv4_ToolKit\modules\bounding_boxes.py", line 60, in bounding_boxes_images
df_val = TTV(csv_dir, name_file, args.yes)
File "C:\Rapso\OIDv4_ToolKit\modules\csv_downloader.py", line 21, in TTV
df_val = pd.read_csv(CSV)
File "C:\Users\Pavan Kumar Sura\AppData\Roaming\Python\Python38\site-packages\pandas\io\parsers.py", line 676, in parser_f
return _read(filepath_or_buffer, kwds)
File "C:\Users\Pavan Kumar Sura\AppData\Roaming\Python\Python38\site-packages\pandas\io\parsers.py", line 454, in _read
data = parser.read(nrows)
File "C:\Users\Pavan Kumar Sura\AppData\Roaming\Python\Python38\site-packages\pandas\io\parsers.py", line 1133, in read
ret = self._engine.read(nrows)
File "C:\Users\Pavan Kumar Sura\AppData\Roaming\Python\Python38\site-packages\pandas\io\parsers.py", line 2037, in read
data = self._reader.read(nrows)
File "pandas\_libs\parsers.pyx", line 860, in pandas._libs.parsers.TextReader.read
File "pandas\_libs\parsers.pyx", line 903, in pandas._libs.parsers.TextReader._read_low_memory
File "pandas\_libs\parsers.pyx", line 2104, in pandas._libs.parsers._concatenate_chunks
File "", line 5, in concatenate
MemoryError: Unable to allocate 55.7 MiB for an array with shape (14610229,) and data type object
@@pavancheyutha3228 Your problem os different. Its a Memory error. If you are running locally maybe your GPU doesn't have enough memory to allocate your batch size...
I need to download images from the Volleyball (Ball) class. Since it includes a parenthesis, I needed to use the character ` to escape it on PowerShell. However, I get this error probably because of the ` character:
IndexError: index 0 is out of bounds for axis 0 with size 0
Any idea on how I can fix this?
I get the error: main.py: error: unrecognized arguments: 400
How can i fox this?
Thank you for your assistance and channel!
You said in this video that python is required , so what do i have to download on my pc for that , did you mean anaconda, because i downloaded that and still i'm getting an error when i run the command pip install in the powershell
everything went fine except:
when using the convert_annotations.py command, I get the error:
" File "convert_annotations.py", line 63, in
coords = np.asarray([float(labels[1]), float(labels[2]), float(labels[3]), float(labels[4])])
ValueError: could not convert string to float: 'heels' ."
I used the class "High heels" in the Open Image Dataset
What should I do ?
oh, I noticed its a problem with the name in the file: "class-descriptions-boxable". after having merged the words with an "_" it worked ! Probably a problem with all descriptions that consist of two words
import os
# Folder Path
path = "path/something/xyz/folder"
search_text="Vehicle registration plate"
replace_text="Vehicle_registration_plate"
# Change the directory
os.chdir(path)
# Read text File
def read_text_file(file_path):
with open(file_path, 'r') as f:
data = f.read()
data = data.replace(search_text, replace_text)
with open(file_path, 'w') as w:
w.write(data)
print()
with open(file_path, 'r') as p:
print(p.read())
# iterate through all file
for file in os.listdir():
# Check whether file is in text format or not
if file.endswith(".txt"):
file_path = f"{path}\{file}"
# call read text file function
read_text_file(file_path)
Hi, thanks for this wonderful tutorial. I have a question, what if I give two classes and one of the downloaded images contain the instances of both classes? Is there a way to generate a .txt label file that inlcude bounding boxes of both classes or just one of them gets generated?
Example u input a baloon image that is self-taken, would it still be recognized by the YOLO Algo? Or is it only limited to TRAINED images??
Hi, can you help me, I followed the method in the video and the download was successful but the label and image are not visible in the folder?
me to
did you find the decision of this issue?
did u find solution?
when i am converting the annotations for multiclasses i am not getting the name one hot encoded it remains as a name in the img.txt file, like it remains Apple ,0.55789,.... and not 0,0.55789
I got this error when ran: python convert_annotations.py
C:\Users\LENOVO\AppData\Local\Programs\Python\Python310\python.exe: can't open file 'C:\\Users\\LENOVO\\Music\\OIDv4_ToolKit\\convert_annotations.py': [Errno 2] No such file or directory
If 2 have more two data set how to run convert_anotation.py, Sir!, erro: out of of range
git is not working and giving error, I have used all the possible ways and installed it but still doesn't show the version and gives error notrecognized git
Foundout that I have to install the Git from it's website and thankfully now it's working
also need to install aws cli for writing the data and cloning onlline
so much to findout
I have a problem
Traceback (most recent call last):
File "~\OIDv4_ToolKit\main.py", line 37, in
bounding_boxes_images(args, DEFAULT_OID_DIR)
File "~\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
How can I fix it?
Thank you
hi sir. may i ask how to solve this problem 'git' is not recognized as an internal or external command,
operable program or batch file.
After running:
python main.py downloader --classes tennis_ball --type_csv train --limit 400
I got the following error:
File "C:\Users\bwhit\Desktop\Projects\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
What might I be doing wrong, or what can I do to fix this? Thanks
EDIT: I have fixed this issue. I was incorrectly spelling the class name. The class name must be case sensitive and spelled correctly.
thank you for clarifying this-- i had the same error
So I trained one class, and it works. Now I want to train another class and add it to the 81 classes (COCO + previously trained class) that are already trained, but if I use the yolov3-custom-final.weights file it doesn't work. How do I do this? Thanks!
The AI Guy,
Respect!
Awesome tutorial @The AI Guy. The images at the end of the training didn't show labels. Any idea of what could cause this problems ? I'm using Ubuntu.
Hey AI thanks a lot for this video.
But yolo expect the NxN data but the data we have is NxM. How you will deal with that?
i have a problem and that is
Traceback (most recent call last):
File "main.py", line 37, in
bounding_boxes_images(args, DEFAULT_OID_DIR)
File "C:\Users\User\Desktop\dataset_toolkit\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
I am getting the below error while running the command for downloader
[INFO] | Downloading Traffic sign.
Traceback (most recent call last):
File "C:\OIDv4_ToolKit\modules\downloader.py", line 25, in download
columns, rows = os.get_terminal_size(0)
OSError: [WinError 6] The handle is invalid
Kindly help me in knowing what should I do here
I figured it out, had to install AWS, the error pointed to that and now images are pulling. Thank you so much!! appreciate your video.
Hii, which command did u use to install aws? I'm having the same issue
Hi,could you tell me what changes will I have make to download segmentation files instead of detection (can I do it?).
very helpful topic explained through a nice presentation.
Great video, thanks!
Thanks The AI Guy...😊
Well done!! Thanks!
Hi , I am getting "MemoryError: Unable to allocate 1.00 MiB for an array with shape (131072,) and data type int64". I spent almost a day to find a solution but no luck. Plz help. Thanks in advance :)
Great tutorial. Congratulations!! I have a dataset with 500 images of water consumption meters. Everything labeled. If someone has been working with similar projects I can send this file.
coords = np.asarray([float(labels[1]), float(labels[2]), float(labels[3]), float(labels[4])])
ValueError: could not convert string to float: 'opener'
How to deal with this?
How you get images also with only downloaing the annotation in CSV format, mine just give the CVS format
reply any if you can please, or should I download the validation or test data also
Thanks for your great tutorial
Hii bro, I am looking for drone class. However it's not included in this. Can you guide how to get drone annotations for yolov3
Hi,
Thanks for the video.
I wanted to check 2 classes which i have downloaded in the same folder using -multiclass -1.
When i run python convert_annotations.py i get an error so how do i mention this 2 class names in classes.txt ?
@The AI Guy hi, I got this: Unable to allocate 55.7 MiB for an array with shape and data type object
I used Balloon and Orange images. The folder OID its ok but when I go to label there is no image.
Could you help me or what should I do. Thanks in advance.
Harry how many images are you trying to download? Sometimes this occurs when trying to download a large amount of images.
@@TheAIGuy I used 100
@@nept4ne check the previous comments, people have posted their solutions to this exact error!
@@TheAIGuy Thanks for the answer Im still trying to fix that :(
error when I set the limit 1000. is it only work for 400?
Hi, how about if I want to download Kitchen & dining room table? should be "Kitchen_&_dining_room_table"?
Great Work ✌
Thx!!! YOU ARE A GREAT PERSON
Hi AI Guy, Thanks for such a great Input
But there is error in your code of - convert_annotations.py
Instead of converting class as 0,1,2 in each txt file it is converting to
3B3a3l3l3o3o3n3 for ballon
3W3o3m3an for woman..and so on..
HI , GUYS I MYSELF SOLVED IT.
actually be very carefull of not giving any extra spaces in classes.txt . By mistake I gave extra space after writing my classes in classes.txt
Thanks for your solution. That was driving me nuts.
@@navalsheth hy same error i am facing , i have class name as Human Face so what to do , i have tried different combinations but still no progress . On keering it Human face label is like 202 . I m using single class
Is this format work with yolo v8 too ?
It doesn't download the image it only downloads the folder and CSV file, the images are missing.
It requires boto3 1.24.28 but it have boto-core-1.29.133 which is in compatible
Thank you for this video, what are the new coordinates ? are they class_id Center_x Center_y box_width box_height all normalized ?
Thanks for your video 😊 you are so cool.
Thank you! Glad you enjoy
Hi. I love your videos. I need a suggestion. I have my dataset but the labels for it are in XML type. Will it work for XML?
No it will not work with XML but you can easily find XML to YOLOv3 annotation converter on the web. Do that and then you can use.
Hello! I have another question! Could someone try to explain to me how I could "merge" my own images and labels with the ones obtained using the OID toolkit. For instance, I want to add a category that is not present in the OpenImages dataset, and so I would have to gather my own images and annotate them, but how could i mix them and convert the annotations to the proper format alongside the others obtained with OID? Thanks!
Hey there, I recommend using the tool called labelImg and I actually have a video already on it. Check it out, it will show you how to draw labels on your own images. Hope this helps.
You are cool bro. I am subscribing you !
asa trha Thanks so much! Appreciate it.
IndexError: index 0 is out of bounds for axis 0 with size 0 I get this error .Please someone help me with this one
check the name of the class
Hi bro
ImportError: No module named modules.parser
how to fix it?
who know?
make sure you are runnning python3, e.g. python3 main.py downloader .... Also don't forget to pip install -r requirements.txt
hi thanks for your helpful videos.. especially for this!
i 'm doing this but i want to adjust another images not in openimagedata,
for this, should i use first 'labelImg' to box , and then convert those label datas to yolo label data using 'convert annotaions.py'??
labelImg creates the labels in the proper format as long as within labelImg you have it set to YOLO and not VOC or Pascal. So there is no need for you to use convert script on labelImg labels! WOOHOO
Currently in subdirectory: train
Converting annotations for class: Vehicle registration plate
100% 400/400 [00:09
Hi AI guy m working on detection of human face with yolo in Tensorflow . Can you plz guide how i convert images to fed in the Tensorflow format?
Can you help me out? I'm getting this error
Traceback (most recent call last):
File "E:\OIDv4_ToolKit\modules\downloader.py", line 25, in download
columns, rows = os.get_terminal_size(0)
OSError: [WinError 6] The handle is invalid
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 37, in
bounding_boxes_images(args, DEFAULT_OID_DIR)
File "E:\OIDv4_ToolKit\modules\bounding_boxes.py", line 62, in bounding_boxes_images
download(args, df_val, folder[0], dataset_dir, class_name, class_code)
File "E:\OIDv4_ToolKit\modules\downloader.py", line 27, in download
columns, rows = os.get_terminal_size(1)
OSError: [WinError 6] The handle is invalid
what is the exact command you are running?
@@TheAIGuy python main.py downloader --classes Balloon Aircraft --type_csv train --limit 400
@@TheAIGuy this is also my error Sir, i hope you can help us
i already got the solution just reading comments
A common reason for the error is that people use GitBash instead of Anaconda Prompt or Windows CMD
Nice one . Would you please tell me how I download the segmentation generated dataset with their labels & preprocess them ?? Please 👍
Did you find out ?
Hey there, I followed the step until : python convert_annotations.py, but it shows Error:
C:\Users\Peter Cham\AppData\Local\Programs\Python\Python38-32\python.exe: can't open file 'convert_annotations.py': [Errno 2] No such file or directory
Can anyone help me? Thank you in advance
I am facing an issue and it says
Traceback (most recent call last):
File "C:\Users\OIDv4_ToolKit\main.py", line 37, in
bounding_boxes_images(args, DEFAULT_OID_DIR)
File "C:\Users\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
can someone help me out?
git : The term 'git' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1
+ git clone github.com/theAIGuysCode/OIDv4_ToolKit.git
+ ~~~
+ CategoryInfo : ObjectNotFound: (git:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I have this error when I am in 3.49 , anyone can help me?
how to resize these images with xmin xmax values ???
i am doing object detection with tensorflow object detection api
i want to resize these images in 800x600
to resize images you should write a script that used the built in resize functions from either opencv (cv2) or pillow! Both can easily be done but are not done with the toolkit.
@@TheAIGuy i can resize all the images easily ,
problem is how to resize min max values???
min max values will changed if i resize a image
.. am i right ?
Anas ALi the labels are in a ratio format so they should remain the same even if you resize!!
it gives me 'aws' is not recognized as an internal or external command when downloading the images
have u solved the problem?
@@dudapiumbini-eng.amb.9008 I think I gave up man
Thanks!
Hey, I was following your videos for a while and let me tell you are doing a great job I was trying to make a custom dataset and followed the instructions that you specified but the images are not downloading and I am getting this error:- aws' is not recognized as an internal or external command,
operable program or batch file. Can you please guide me to solve this issue please do reply as I am waiting for it
Hi , have you resolved the issue?
docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
Have u guys resolved it? I'm having the same issue
I want dataset for Persons but u couldn't mentioned Person on type_csv file....what can I do for it
type_csv should be set to train, there is a class for Person in open images dataset. Not sure what the error is here.
there is no Person class on class-descriptions-boxable.csv file....,how can i mention person class on that file....and u downloaded Balloon dataset...I think so it is working becuase their is a Balloon class on class-descriptions-boxable.csv file.....i placed Person instead of Balloon....that dataset is downloaded but couldn't shows on train folder...y becuase thier is no person class on class-descriptions-boxable.csv file....so finally my problem is how add person class to class-descriptions-boxable.csv file
@@sathishbabu3867 did you able to download the person class
?
You`re the best!!
Hi, I'm getting an error in PowerShell
"D:\Images\OIDv4_ToolKit> pip install -r requirements.txt
pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ pip install -r requirements.txt
+ ~~~
+ CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException"
Hey! I know its late, but stilll if someone else is facing same issue, write
py -m pip install -r requirements.txt
can make some videos about deep learning object trackers and how train them ?
Yes! I will be having an object tracker video posted within the next couple days. Stay tuned.
@@TheAIGuy im waiting for that hope its gonna be about deep sort , kcf or MDnet :D
The King It will be about how to use deepsort and yolov3 together to do object tracking!
Thanks for your video,. I need to detect whether a person is wearing a seatbelt or not. how to do this using YOLOV3
why don't you simply use classification instead of more complex object detection for your use case?