tensorflow-yolo3
tensorflow-yolo3 copied to clipboard
What about the performance of tensorflow-yolov3
Hi, I have a problem. I used a single GTX 1080TI to run. Then I followed the steps you said, and tested the image named dog,jpg. But, I found the time of predicting was a few seconds, while darknet was just about 22 ms. Is there anything wrong with my operation? And what is the performance you think? Thanks very much!
@JSnobody hello, load the yolov3.weights will cost a lot time, if you restore the check point will be better. and the performance of tensorflow is slower than darknet
@aloyschen Hi, yes, I know that load network and weights will cost a lot of time. I just try to test the predicting time. And I tested the time of functions as 'model.yolo_inference' and 'self.eval'. They used a few seconds. I think it need to be further optimized. Do you think so? Need some help from you! Thanks a lot!
@JSnobody hello, I have test the time on Tesla M40, and the first image cost a lot time, then the next will be fast, I don't know the reason, the reason may be caused by tensorflow. you can also try detect many images in a loop
Found 3 boxes for img
dog 0.99 (128, 224) (314, 537)
truck 0.91 (475, 85) (689, 170)
bicycle 0.99 (162, 119) (565, 441)
image: ./dog.jpg cost time: 4.416236400604248 second
Found 1 boxes for img
dog 1.00 (180, 239) (877, 643)
image: ./test.jpg cost time: 0.09656620025634766 second
@aloyschen hello, thanks for your reply!
@aloyschen By the way, I want to train COCO dataset on the project, tensorflow-yolo3. For training, will it be slower than darknet? Could you share your experience of training on it? THANK YOU!
hi @aloyschen ,how about the mAP of your code.
@aloyschen @DW1HH can we communicate by mail? My address is [email protected]. Thanks!
@JSnobody hi, the training speed depend on GPU, I test training on M40, batch size is 10, one iteration cost about 0.5S
@aloyschen hi, that looks like much better than inference.
Hi all. Is there any suggestion to optimize the speed of inference? @JSnobody @aloyschen Thanks!
I change the code of self.eval(). Specifically, I change the way of NMS in the author's code, I do the NMS among all the boxes instead of doing the NMS for the boxes of the each class separately. It reduced the inference time obviously.
@lkj1114889770 在多种类别的目标检测中,NMS是需要按照每个类别去做的,不然两个不同种类的box iou很大的时候,一起做nms会出问题,如果要提高速度,可以尝试把nms改成gpu上计算。
好,我试试,谢谢。 @aloyschen
楼主可以建个群,大家可以多交流交流噢
Hi, May I ask how can you run your model in a loop? I tried running the detect.py in a loop but it gives me errors like Variable predict/darknet53/conv2d_1/kernel already exists. But if I set the kenel to be reuseable, the gpu would be initialized wvery time I run the detect.py
https://github.com/viplix3/YOLO