/ai-autolabel-

autolabel

Primary LanguagePython

ai-autolabel-

autolabel

the code performs a search on youtube based on the two keywords set at the beginning of the code set as title and channel name (actually it only performs a search on the youtube bar with the two keywords I specify that the second i.e. channel name is optional and not necessary for research, but useful as it filters the results better especially if you want to follow a playlist or a specific youtube channel), performs a quick download of the video found at 640 resolution and saves its title in the log file to avoid duplication . once downloaded it processes the video by dividing it into frames with a size of 640x640, once the frames have been created, it divides the folder of the frames into two other subfolders at this point it executes yolov5, a process for each subfolder created i.e. 2 (subfolder1 and subfolder2) this means that you are running yolov5 2 times at the same time (I think it's the fastest method, previously the code only ran yolov5 on a folder at 100it/s speed by running one yolov5 per folder I get 70/65 it/s per folder which added up should do more than 100 it/s) in this process the code filters and deletes the low confidence level images once the Images are filtered it moves the remaining images to the root folder then runs yolov5 again and finds the location of the boundingboxes in the image and create the text files to carry out the training finished this selects 15% of the images with the corresponding labels and creates the valid folder with the respective images and labels folders and their files inside finally the code moves the train and valid folder in a folder created that renames with a random name and moves it to a folder created with the name dataset finally the code checks the dataset folder if there are folders without files it deletes the folder so as to keep the dataset folder clean finished this the code starts again again looking for another video on youtube. (when it no longer finds videos with the names set in the search, the code will work in vain, i.e. create empty folders but thanks to the folder check at the end of the code, it will simply eliminate the empty folders) ** in the future I would like to implement a system that searches and automatically change the most interesting keywords based on the title