Open abdulkalam1233 opened 6 years ago
You can use any of these file: yolov2-voc.cfg, yolov2-tiny-voc.cfg, yolo-voc.cfg, yolo-voc.2.0.cfg
How to train Yolo v2: https://github.com/AlexeyAB/darknet/tree/47c7af1cea5bbdedf1184963355e6418cb8b1b4f#how-to-train-to-detect-your-custom-objects
Accuracy comparison: https://pjreddie.com/darknet/yolov2/
Thank you @AlexeyAB I have trained individual multi object while testing i am getting large bounding box can help me get rid of it (first object trained) (2nd object trained) (predictions)
@abdulkalam1233
Did you check your dataset by using Yolo_mark? https://github.com/AlexeyAB/Yolo_mark
How many iterations did you train?
What mAP can you get? https://github.com/AlexeyAB/darknet#when-should-i-stop-training
@AlexeyAB Yeah i am using some different way to approach to get bounding boxes. I have trained 40000 iterations sorry i haven't noticed the mAP ########## This i my cfg file looks like
[net]
# Testing
batch=64
subdivisions=8
# Training
# batch=64
# subdivisions=2
width=416
height=416
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1
learning_rate=0.001
max_batches = 40200
policy=steps
steps=-1,100,20000,30000
scales=.1,10,.1,.1
[convolutional]
batch_normalize=1
filters=16
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=2
[convolutional]
batch_normalize=1
filters=32
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=2
[convolutional]
batch_normalize=1
filters=64
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=2
[convolutional]
batch_normalize=1
filters=128
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=2
[convolutional]
batch_normalize=1
filters=256
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=2
[convolutional]
batch_normalize=1
filters=512
size=3
stride=1
pad=1
activation=leaky
[maxpool]
size=2
stride=1
[convolutional]
batch_normalize=1
filters=1024
size=3
stride=1
pad=1
activation=leaky
###########
[convolutional]
batch_normalize=1
size=3
stride=1
pad=1
filters=1024
activation=leaky
[convolutional]
size=1
stride=1
pad=1
filters=35
activation=linear
[region]
anchors = 1.08,1.19, 3.42,4.41, 6.63,11.38, 9.42,5.11, 16.62,10.52
bias_match=1
classes=2
coords=4
num=5
softmax=1
jitter=.2
rescore=1
object_scale=5
noobject_scale=1
class_scale=1
coord_scale=1
absolute=1
thresh = .6
random=1
Any modifications are needed in above cfg file to get correct output or else i need to increase number of images for training. Currently for training i am using 25 images for a class.(for sample)
Looks like your dataset is wrong.
@AlexeyAB Can you suggest me how to choose the proper training dataset for training yolo.
Thank you Kalam
On Thu 21 Jun, 2018, 5:28 PM Alexey, notifications@github.com wrote:
Looks like your dataset is wrong.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AlexeyAB/darknet/issues/1064#issuecomment-399078452, or mute the thread https://github.com/notifications/unsubscribe-auth/AlagUNtWOn4gp6Aj6IeVScn8J5OnQxjqks5t-4pLgaJpZM4Utsej .
@abdulkalam1233 Use: https://github.com/AlexeyAB/Yolo_mark
https://github.com/AlexeyAB/darknet#how-to-improve-object-detection
check that each object are mandatory labeled in your dataset - no one object in your data set should not be without label. In the most training issues - there are wrong labels in your dataset (got labels by using some conversion script, marked with a third-party tool, ...). Always check your dataset by using: https://github.com/AlexeyAB/Yolo_mark
@AlexeyAB
Thank you so much AlexeyAB
On Thu 21 Jun, 2018, 5:52 PM Alexey, notifications@github.com wrote:
@abdulkalam1233 https://github.com/abdulkalam1233 Use: https://github.com/AlexeyAB/Yolo_mark
https://github.com/AlexeyAB/darknet#how-to-improve-object-detection
check that each object are mandatory labeled in your dataset - no one object in your data set should not be without label. In the most training issues - there are wrong labels in your dataset (got labels by using some conversion script, marked with a third-party tool, ...). Always check your dataset by using: https://github.com/AlexeyAB/Yolo_mark
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AlexeyAB/darknet/issues/1064#issuecomment-399084816, or mute the thread https://github.com/notifications/unsubscribe-auth/AlagUJObqgAgTCfVucccHMybPojFjB8Fks5t-5APgaJpZM4Utsej .
@AlexeyAB What is the meaning of following statement? "YOLO reframes object detection as a single regression problem,"
@abdulkalam1233
Are you about it? https://arxiv.org/pdf/1506.02640.pdf
We reframe object detection as a single regression problem, straight from image pixels to bounding box coordinates and class probabilities. Using our system, you only look once (YOLO) at an image to predict what objects are present and where they are
Before Yolo, there were neural networks approaches for object detection such as RCNN, FastRCNN, FasterRCNN, ... (with many backbones AlexNet, VGG, ResNet, GoogleNet, Inception,...) that used many inferences for 1 detection.
Yolo is the first neural network that uses only one inference for 1 detection.
More about it: https://groups.google.com/d/msg/darknet/1siKv2Z_ReA/DV5-ZYjFAgAJ and: https://groups.google.com/d/msg/darknet/1siKv2Z_ReA/vDZtZooJAwAJ
@AlexeyAB Thanks again... I have a doubt? i will share some example image that i have trained which are giving perfect results for the images which are used to train only. When i am trying for not trained images there is now [detection.]
can you suggest me how to resolve it? can please forward your one dataset of multi class trained images that may help me? which is the perfect size of image to train?
which is the perfect size of image to train?
Any size. But you must follow the rules: https://github.com/AlexeyAB/darknet#how-to-improve-object-detection
General rule - your training dataset should include such a set of relative sizes of objects that you want to detect:
train_network_width train_obj_width / train_image_width ~= detection_network_width detection_obj_width / detection_image_width
train_network_height train_obj_height / train_image_height ~= detection_network_height detection_obj_height / detection_image_height
Also:
desirable that your training dataset include images with objects at diffrent: scales, rotations, lightings, from different sides, on different backgrounds - you should preferably have 2000 images for each class or more
@abdulkalam1233
I mean:
change this line: https://github.com/AlexeyAB/darknet/blob/6390a5a2ab61a0bdf6f1a9a6b4a739c16b36e0d7/cfg/yolov3.cfg#L720
to this: layers = -1, 11
and change this line: https://github.com/AlexeyAB/darknet/blob/6390a5a2ab61a0bdf6f1a9a6b4a739c16b36e0d7/cfg/yolov3.cfg#L717
to this: stride=4
So the last [yolo]
-layer will look at the layer-11 (with 2 subsample-layers) instead of layer-36 (with 3 subsample-layers).
So last [yolo]
-layer will see smaller objects.
Note: subsample-layers - is any layer (conv, maxpool, ...) with stride=2
(more than 1)
@AlexeyAB I want to make use of yolov2 for mobile application can you suggest me which .cfg i have to use to train and test yolo?