experiencor / keras-yolo2

Easy training on custom dataset. Various backends (MobileNet and SqueezeNet) supported. A YOLO demo to detect raccoon run entirely in brower is accessible at https://git.io/vF7vI (not on Windows).
MIT License
1.73k stars 784 forks source link

YOLO version 3 equivalent in Keras #207

Closed hiba007 closed 6 years ago

hiba007 commented 6 years ago

Can anybody help me in building YOLOv3 architecture in keras? here is the link I think its residual network https://github.com/pjreddie/darknet/blob/master/cfg/yolov3.cfg @experiencor

experiencor commented 6 years ago

@hiba007 ResNet backend is currently supported. Please check the readme. If possible, can you provide a drawing of YOLOv3.

ghost commented 6 years ago

after reading, i found some main different things btw 2 and 3:

hiba007 commented 6 years ago

drawing means architecture ? here is cfg file https://github.com/pjreddie/darknet/blob/master/cfg/yolov3.cfg

hiba007 commented 6 years ago

you mean this? @experiencor yolov3 1 yolov3 2 yolov3 3 yolov3 4

experiencor commented 6 years ago

@hiba007 @txdat Interesting changes! I'll take a closer look.

cthacker commented 6 years ago

Yolov3 also doesn't use softmax and just uses logistic units for each class (multiclass classification)

PythonImageDeveloper commented 6 years ago

@txdat , what's this mean : using anchors' size from input size, not output size (yolo2) -> new anchors 's size = 32x i know about anchors and using k-means for getting these value but i don't know what's mean anchors from input and output ? that's mean in the v3 the anchors directly get from images ?

experiencor commented 6 years ago

in version 3, anchor sizes are absolute, not relative to grid size like in version 1 and 2

PythonImageDeveloper commented 6 years ago

what are the advantage of this method rather relative?

experiencor commented 6 years ago

@zeynali I'm not very clear about this. Still working on the new loss function.

experiencor commented 6 years ago

@hiba007 @txdat @zeynali YOLOv3 detection is out. Still working on the new multi-scale loss training.

PythonImageDeveloper commented 6 years ago

@experiencor , Thanks a lot , When will the multi-scale training be prepared? please explain about differences between v3 and v2 ? more details if possible. Thanks

cthacker commented 6 years ago

@experiencor New model looks good.

why do you resize the image but keep the aspect ratio the same and embed into a letterbox? Do you find that helps with accuracy?

Also are you planning to implement the lossfn for this network or no? I'm still trying to figure out everything that is different compared the standard yolo loss.

PythonImageDeveloper commented 6 years ago

@cthacker , Is not this implementation of yolo3 loss function corresponding to original Version 3?

ghost commented 6 years ago

@experiencor 2 things i dont understand in yolo3_detect.py: 1) netout[..., 5:] = netout[..., 4][..., np.newaxis] * netout[..., 5:]' why do you multiply iou_score to class_score? 2) you compute overlaps in (0. 1) scale not input's scale?

And prediction boxes are computed like yolo2, why dont warmup need in yolo3? prediction bbox have xy_pred in output's scale and wh_pred in input's scale?

experiencor commented 6 years ago
  1. It's P(Class) = P(Class|Object) * P(Object)
  2. When you compute IOU, it does not matter.
  3. I don't why warmup is omitted in the new loss function. Asked a question but not yet get the answer.
experiencor commented 6 years ago

https://github.com/experiencor/basic-yolo-keras/tree/master/experimental => YOLO 3

muye5 commented 6 years ago

Expect the training part for v3....deeply.

experiencor commented 6 years ago

It's here https://github.com/experiencor/keras-yolo3