AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.65k stars 7.96k forks source link

Create custom model for 230.000 images #4350

Open ogulcankarayel5 opened 4 years ago

ogulcankarayel5 commented 4 years ago

I have jpg files that contains 230.000 car plate images for graduate project and i'm new for this topic. What exactly should I do for plate recognation. Which format should I use and how can I convert 230.000 images to data format that you will say.Also do i have to convert images files with my own hands or is there any tool for 230.000 images.

AlexeyAB commented 4 years ago
  1. How to label your dataset: https://github.com/AlexeyAB/darknet#how-to-mark-bounded-boxes-of-objects-and-create-annotation-files

in C++: https://github.com/AlexeyAB/Yolo_mark in Python: https://github.com/tzutalin/labelImg in Python: https://github.com/Cartucho/OpenLabeling in C++: https://www.ccoderun.ca/darkmark/

  1. How to train (to detect your custom objects): https://github.com/AlexeyAB/darknet#how-to-train-to-detect-your-custom-objects

Just use yolov3-spp.cfg as base cfg.


Just to know, Yolo is object Detector, so it can detect license plate and separate letters with its coordinates, but you should collect from them the license plate number yourself in your code.

ogulcankarayel5 commented 4 years ago

Thanks but I wonder something.It's impossible to convert 230.000 images with hands so do you have any suggestion ?

AlexeyAB commented 4 years ago

You shouldn't convert images.

ogulcankarayel5 commented 4 years ago

Sorry,but i'm very confused.Don't we need annotation for each image

AlexeyAB commented 4 years ago

Yes, you must create txt-files with annotations. But jpg-images shouldn't be changed.

ogulcankarayel5 commented 4 years ago

Yes but how can I create txt files with annotations each 230.000 images :) do you have any suggestion. By the way thanks for your answers,if my question is bothering you just sorry because they are a little ridicilous I guess , but I'm new on this topic .

AlexeyAB commented 4 years ago

If you already have annotation in another format - then create script for converting. Othewise you should label objects manually.

ogulcankarayel5 commented 4 years ago

Do you have a tool for labeling

ogulcankarayel5 commented 4 years ago

Can i use this site for annotation: https://supervise.ly

AlexeyAB commented 4 years ago

I don't know, try to use it. And tell us about the results. What can they do and for what money?

ogulcankarayel5 commented 4 years ago

I guess a web platform for deep learning things and priceless. If i use it, of course I tell the results.

LukeAI commented 4 years ago

@ogulcankarayel5 which dataset is it? I might be able to help

ogulcankarayel5 commented 4 years ago

@LukeAI just images right now but i try to annotate to yolo format with supervisely

LukeAI commented 4 years ago

but where did you get the images? Is it a private dataset or public?

ogulcankarayel5 commented 4 years ago

I got images from my teacher for graduate project so it is private i can't share all of it. But i can share a little

LukeAI commented 4 years ago

ok. It will take you forever to annotate 250,000 images - my suggestion would be to train a model on an already labelled dataset (try looking here https://platerecognizer.com/number-plate-datasets/) and using that model to label your data for you. Then manually reviewing the generated labels. You can click through much faster and just make corrections as necessary. I recommend CVAT for annotating - it can import and export in Yolo format too.

AlexeyAB commented 4 years ago

@LukeAI Is https://github.com/opencv/cvat better than these? May be I will add URL to it: https://github.com/AlexeyAB/darknet#how-to-mark-bounded-boxes-of-objects-and-create-annotation-files

in C++: https://github.com/AlexeyAB/Yolo_mark in Python: https://github.com/tzutalin/labelImg in Python: https://github.com/Cartucho/OpenLabeling in C++: https://www.ccoderun.ca/darkmark/

AlexeyAB commented 4 years ago

@ogulcankarayel5 Yes, you can label 1000 images from your dataset, then train the yolov3-spp.cfg model, and then run detection on other 230 000 images, so your trained model will detect objects on other images and will label these objects - by using pseudo-labeling:

Pseudo-lableing - to process a list of images data/new_train.txt and save results of detection in Yolo training format for each image as label .txt (in this way you can increase the amount of training data) use: ./darknet detector test cfg/coco.data cfg/yolov3.cfg yolov3.weights -thresh 0.25 -dont_show -save_labels < data/new_train.txt

Then you can just run one of these tools, check labels if they are correct, and fix only incorrect labels: in C++: https://github.com/AlexeyAB/Yolo_mark in Python: https://github.com/tzutalin/labelImg in Python: https://github.com/Cartucho/OpenLabeling in C++: https://www.ccoderun.ca/darkmark/ JavaScript: https://github.com/opencv/cvat

LukeAI commented 4 years ago

@LukeAI Is https://github.com/opencv/cvat better than these? May be I will add URL to it: https://github.com/AlexeyAB/darknet#how-to-mark-bounded-boxes-of-objects-and-create-annotation-files

in C++: https://github.com/AlexeyAB/Yolo_mark in Python: https://github.com/tzutalin/labelImg in Python: https://github.com/Cartucho/OpenLabeling in C++: https://www.ccoderun.ca/darkmark/

I found CVAT to be more productive and easier to use than labelimg and yolo_mark, another nice thing is that it runs as a web server so it's easy to create and manage jobs centrally and organise a team to do the annotating

ogulcankarayel5 commented 4 years ago

Thanks both of you ,i will try that you suggested and tell the results

ogulcankarayel5 commented 4 years ago

Hi again, 0 0.496875 0.583333333333 0.1390625 0.113888888889 Is this the correct annotating for this repo.

AlexeyAB commented 4 years ago

For Yolo - yes. For your objects - I dont know.

ogulcankarayel5 commented 4 years ago

This annotation is my image annotation that I've just created using tool that you sent me.