tensorflow-yolov4-tflite
tensorflow-yolov4-tflite copied to clipboard
Why do you get only 61.96% AP50 for YOLOv4-512x512 instead of 64.9% AP50 that I can get by using Darknet?
@hunglc007 Hi,
Why do you get only 61.96%
AP50 for YOLOv4-512x512 https://github.com/hunglc007/tensorflow-yolov4-tflite#map50-on-coco-2017-dataset instead of 64.9%
AP50 that I can get by using Darknet? https://github.com/AlexeyAB/darknet/wiki/How-to-evaluate-accuracy-and-speed-of-YOLOv4
Did you use https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights for evaluation or train your own model for this case?
There seems to be inconsistency in detection using the Darknet and Tensorflow. TF detects fewer objects and with less confidence.
It seems to find the reason you need a layer-by-layer comparison of the feature map TF vs Darknet.
Model | Darknet | hunglc007/tensorflow-yolov4-tflite (pb, tflite, tfile16) |
---|---|---|
YOLOv4 | ![]() |
![]() |
YOLOv4-tiny | ![]() |
![]() |
Original image:
There seems to be inconsistency in detection using the Darknet and Tensorflow. TF detects fewer objects and with less confidence.
It seems to find the reason you need a layer-by-layer comparison of the feature map TF vs Darknet.
Model Darknet hunglc007/tensorflow-yolov4-tflite (pb, tflite, tfile16) YOLOv4
![]()
YOLOv4-tiny
![]()
Original image:
Would you recommend and better TensorFlow implementation. my better i mean better detection and faster processing.
I am training yolov4-tiny with activation set to relu. The inference result using weights(mAP50-29%) is as above. I don't know if this will help.
Using yolov4-tiny.weights, I trained 300 times with batch_size=32. The result is as above.
I am training yolov4-tiny with activation set to relu. The inference result using weights(mAP50-29%) is as above. I don't know if this will help.
Have you made any other changes besides relu? I would be interested in looking at the code if your able/willing to share.
Ref
- https://wiki.loliot.net/docs/etc/project/yolov4/yolov4-training
- https://github.com/hhk7734/tensorflow-yolov4
from yolov4.tf import YOLOv4
yolo = YOLOv4()
yolo.classes = "coco.names"
yolo.make_model(activation1="relu")
yolo.load_weights("yolov4-tiny-relu.weights", weights_type="yolo")
yolo.inference(media_path="kite.jpg")
yolo.inference(media_path="road.mp4", is_image=False)
Thank you.
@AlexeyAB @hunglc007 Do you have anything new about the conversion between darknet and tensorflow? I have inconsistent results when converting from yolov3 darknet to tensorflow with this repo too. Currently, there aren't any repos that can convert the exact result from darknet to tensorflow as my research.
@AlexeyAB @hunglc007 Do you have anything new about the conversion between darknet and tensorflow? I have inconsistent results when converting from yolov3 darknet to tensorflow with this repo too. Currently, there aren't any repos that can convert the exact result from darknet to tensorflow as my research.
@vqbang did you get any solution?
@AlexeyAB @hunglc007 Do you have anything new about the conversion between darknet and tensorflow? I have inconsistent results when converting from yolov3 darknet to tensorflow with this repo too. Currently, there aren't any repos that can convert the exact result from darknet to tensorflow as my research.
@vqbang did you get any solution?
Yes I would also like to hear what you get too!
@zz100chan unfortunately I did not get the solution. Maybe there are other heuristics in the Darknet version which may be the reason for its good detection performance. The tenserflow version of YOLO detectors miss a lot of detections. I don't know why? Even I tried the OpenCV Yolo DNN but still not as good as Darknet.