Traffic-Light-Detection-Using-YOLOv3 icon indicating copy to clipboard operation
Traffic-Light-Detection-Using-YOLOv3 copied to clipboard

How do I change the path in prepare_labels.py

Open BigBrowww opened this issue 3 years ago • 6 comments

Hello and good evening. When I changed the path in prepare_lables.py after installing the dataset, I found that there is no such path like [ input/labels/{image_name.split('.') [0]}.txt ] or [ input/images/{image_name} ] in the folder of the dataset,. waiting for your reply, thank you!

BigBrowww avatar May 10 '22 12:05 BigBrowww

Hello. Please note that the dataset is one folder back in the input directory. Therefore, it is ../input/rest_of_the_path. Can you please make sure it is the same case in your code as well?

sovit-123 avatar May 10 '22 16:05 sovit-123

Hi Here's the thing, I didn't run the code on Kaggle, so I extract the dataset to my hard drive, and the path is E:\Archive, and in the Archive folder is Anovation, DayTrain, etc., so I'm having some trouble figuring out how to change the path in prepare_labels.py.

BigBrowww avatar May 12 '22 10:05 BigBrowww

Yup, this error makes me confuse. I have changed annotation_root and image_root.But I dont know how to get the *.txt ``UCC Z8(3~{H0CQ69BKT`P

BigBrowww avatar May 12 '22 19:05 BigBrowww

Can you try giving relative path like the code expects? The code in this repo does not expect Kaggle environment but local system. So, having the data one folder back in the input directory that is ../input should work without issues.

sovit-123 avatar May 13 '22 01:05 sovit-123

hello, i have a same probleme : FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/SADDEDINE_H/Desktop/Trafic Lights/Data/label/dayClip1--00000.txt' I downloaded all the LISA data I deposited it in the desktop but I can't find the ".txt"

HASSINASADDEDINESegula avatar Jun 28 '22 22:06 HASSINASADDEDINESegula

Yup, this error makes me confuse. I have changed annotation_root and image_root.But I dont know how to get the *.txt ``UCC Z8(3~{H0CQ69BKT`P

You should create image and labels folders in those directories so you can run them

Jiachengc320 avatar Nov 10 '23 08:11 Jiachengc320