License-plate-detection icon indicating copy to clipboard operation
License-plate-detection copied to clipboard

No such file or directory: 'label_train.txt'

Open bellaav opened this issue 5 years ago • 8 comments

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?

bellaav avatar Jun 21 '19 02:06 bellaav

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

ThorPham avatar Dec 20 '19 03:12 ThorPham

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

Rubeen-Mohammad avatar Mar 06 '20 12:03 Rubeen-Mohammad

@Chotu-Ruby You want to train model ?

ThorPham avatar Mar 06 '20 15:03 ThorPham

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

harshilishere avatar Mar 09 '20 10:03 harshilishere

@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 avatar Mar 11 '20 00:03 BradAxl

@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 avatar Mar 11 '20 05:03 harshilishere

@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.

BradAxl avatar Mar 12 '20 16:03 BradAxl

@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!

harshilishere avatar Mar 13 '20 14:03 harshilishere