Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training on custom dataset #114

Open
sampreets3 opened this issue Mar 9, 2021 · 0 comments
Open

Training on custom dataset #114

sampreets3 opened this issue Mar 9, 2021 · 0 comments

Comments

@sampreets3
Copy link

Hello, thanks a lot for sharing this code. It is really helpful. I have tried out your example on the yymnist dataset you provided, but I wanted to train my own dataset which I have created. I took a look at the files that were generated when I ran the make_data.py with the example you mentioned in your readme file, and this was the directory structure:

├── test
│   ├── 000001.jpg
│   ├── 000002.jpg
│   ├── 000003.jpg
.     .
.     .
.     .
│   ├── 000197.jpg
│   ├── 000198.jpg
│   ├── 000199.jpg
│   └── 000200.jpg
├── train
│   ├── 000001.jpg
│   ├── 000002.jpg
│   ├── 000003.jpg
│   ├── 000004.jpg
.     .
.     .
.     .
│   ├── 000997.jpg
│   ├── 000998.jpg
│   ├── 000999.jpg
│   └── 001000.jpg
├── yymnist_test.txt
└── yymnist_train.txt

So far, this is very similar to what I have as well :

dataset
├── train
│   ├── img-1.jpg
│   ├── img-1.txt
│   ├── img-2.jpg
│   ├── img-2.txt
.     . 
.     .
.     .
│   ├── img-999.jpg
│   ├── img-999.txt
│   ├── img-1000.jpg
│   ├── img-1000.txt

├── test
│   ├── img-1.jpg
│   ├── img-1txt
│   ├── img-2.jpg
│   ├── img-2.txt
.     . 
.     .
.     .
│   ├── img-199.jpg
│   ├── img-199.txt
│   ├── img-200.jpg
│   ├── img-200.txt
├── test.txt
├── train.txt
└── classes.names

I want to use transfer learning to start with the original yolov3.weights file and take it from there. I am using labelImg as an image annotation tool, and I would like to know how I can convert this structure to be usable in your code. Each image has a corresponding text file which contains the annotation in the format that labelImg exports it in: <class-id> <x> <y> <w> <h> which are all normalised. But for your file I see something like this(yymnist_train.txt) : dataset/train/000001.jpg 136,361,150,375,3 328,125,412,209,4 244,25,328,109,6

Can you please help me convert my annotated dataset into the format that is accepted in your code?

Many thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant