pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.68k stars 21.32k forks source link

training custom object in YOLOv3, how does it work? #612

Open akinohana opened 6 years ago

akinohana commented 6 years ago

I got an project needs to detect person in anime-like style vedios

I just tested YOLOv3 608x608 with COCO in GTX 1050TI

however speed is only at about ~1.5FPS , but I need at least 10 FPS on 1050TI for my project

1.I want to know that does the number of the classes will effect detection speed? (COCO is about finding 80 object in picture? if I just need find one object, will it go 80x faster?)

2.when I input image for training ,original image are 1920*1080, should I resize them to 608x608 before labeling and training?

3.is there any labeling tool should I use? in README.md at https://github.com/AlexeyAB/darknet <x> <y> <width> <height> seems need to be calculate and input by hand which seems too hard, maybe there is a tool I just need to crop where the object is in image?

4.if the object is not a square in image, how does YOLO know which part are object? How to avoid it train background as object?

do I have to remove all background and fill it as black, only keep the object in image?

is the output always a box? can I train and get output as mask? if I detect as mask, will it slower then box because it seems to be more information?

6.to get a good result, how many training image and test image should I make?

I know it's just some noob question in CV, however I really want to know this without spending weeks in training and find out answer myself , an answer will be appreciated!

pjryan513 commented 6 years ago

For question 3 I would follow the example here. It is for yoloV2 but should still work for yoloV3. Or you could always write your own python script for getting the information.

TheMikeyR commented 6 years ago
  1. No, classes does not affect testing speed

  2. No, the framework will resize the image to the network size specified in the .cfg file

  3. https://github.com/AlexeyAB/Yolo_mark

  4. YOLO looks at objects in context of the background, if you want to train it without background you should segment it, by hand labelling or using another neural network to do this. Furthermore YOLO learns the object by analyzing on the labelled box, edges etc. a

YOLO's output is always a box.

  1. Thumbs of rule is to use at least 2000 images per class

Most of your questions you would be able to answer by looking at previous issues in this repo or at https://github.com/AlexeyAB/darknet

ManivannanMurugavel commented 6 years ago

Follow the link: https://medium.com/@manivannan_data/how-to-train-yolov3-to-detect-custom-objects-ccbcafeb13d2

Sauraus commented 5 years ago

Follow the link: https://medium.com/@manivannan_data/how-to-train-yolov3-to-detect-custom-objects-ccbcafeb13d2

Looks like the link is broken. 😞

ManivannanMurugavel commented 5 years ago

Now its worked.

yuanjingsong commented 5 years ago
  1. No, classes does not affect testing speed
  2. No, the framework will resize the image to the network size specified in the .cfg file
  3. https://github.com/AlexeyAB/Yolo_mark
  4. YOLO looks at objects in context of the background, if you want to train it without background you should segment it, by hand labelling or using another neural network to do this. Furthermore YOLO learns the object by analyzing on the labelled box, edges etc. a

YOLO's output is always a box.

  1. Thumbs of rule is to use at least 2000 images per class

Most of your questions you would be able to answer by looking at previous issues in this repo or at https://github.com/AlexeyAB/darknet

I wonder whether the image size affect the time or not. For example , predicting a half pic instead of the whole pic will decrease the time

cyrineee commented 5 years ago

to get a good result, how many training image per class should i have ?

Hozaifa-Bhutta commented 5 years ago

to get a good result, how many training image per class should i have ?

I think you should have around 1500 to 2000 pictures for each class for training.