ThorPham / License-plate-detection

This project using yolo3 to detection license plate in street
140 stars 43 forks source link

No such file or directory: 'label_train.txt' #1

Open bellaav opened 5 years ago

bellaav commented 5 years ago

Here is the full error:

Traceback (most recent call last): File "train.py", line 214, in var=opt.var, File "train.py", line 41, in train dataloader = LoadImagesAndLabels(train_path, batch_size, img_size, multi_scale=multi_scale, augment=True) File "/Users/IsabellaTing/Downloads/License-plate-detection-master/utils/datasets.py", line 94, in init with open(path, 'r') as file: FileNotFoundError: [Errno 2] No such file or directory: 'label_train.txt'

Wondering if the repo is just incomplete for now?

ThorPham commented 4 years ago

If you want to train model you should prepare datasets same format VOC.

Rubeen-Mohammad commented 4 years ago

Hi! Firstly Thank you so much for the model. I need to submit this work immediately, so could you please provide me label_train.txt and label_test.py. Thank you

ThorPham commented 4 years ago

@Chotu-Ruby You want to train model ?

harshilishere commented 4 years ago

hey I am also getting the same error. Trying to use this repo: https://github.com/RobertLucian/license-plate-dataset

Please tell me exactly what to do.

Thanks

BradAxl commented 4 years ago

@harshilishere You can't use that dataset or at least no with the current format because it has VOC format and for training this model (ThorPham repo) you need a dataset with COCO format which is a little different. What you can do is change RobertLucian's repo format or creating a new one. Hope that helps you.

harshilishere commented 4 years ago

@harshilishere You can't use that dataset or at least no with the current format because it has VOC format and for training this model (ThorPham repo) you need a dataset with COCO format which is a little different. What you can do is change RobertLucian's repo format or creating a new one. Hope that helps you.

@BradAxl Thanks for your reply. Can you please guide me on how to convert this data set into COCO? because I am a complete beginner don't know much. I cannot make a new dataset as i won't be able to college enough images. Thanks again!

BradAxl commented 4 years ago

@harshilishere You can't use that dataset or at least no with the current format because it has VOC format and for training this model (ThorPham repo) you need a dataset with COCO format which is a little different. What you can do is change RobertLucian's repo format or creating a new one. Hope that helps you.

@BradAxl Thanks for your reply. Can you please guide me on how to convert this data set into COCO? because I am a complete beginner don't know much. I cannot make a new dataset as i won't be able to college enough images. Thanks again!

@harshilishere I don't have a step-by-step guide on how to convert VOC format into COCO, but the general idea for creating a data set with COCO format is having a main folder composes by annotations folder (it has a json with all information about the dataset, search for it on websites), images folder divided into train folder and valid folder (where you place your images) and labels folder divided into train folder and valid folder as well (a lot of txt files which has the image's name and contains bbox and classes of the image). After that, create two txt files with the path to every image which you're gonna use for training and for validation. Lastly, you have to create a file with '.data' extension (you're gonna need coz it's a parameter for training) and there is where you specify the paths to two txt created in the previous step, and also the path to the classes.

I know it's a little confused, but that's the conclusion that I got after checking both formats and I hope that can help you. Anyway, If you have information bout how to convert one into another format share with me please coz I'm also trying to find out a way to do that.

harshilishere commented 4 years ago

@BradAxl Hey thanks for explaining about coco. Yes I am also learning about that. And will try again after i get some dataset to run this code. It is a bit confusing though and hard to find fresh tutorials on it. But I will try and post the steps here for sure!