Closed tak-s closed 4 years ago
Thanks for sharing your faster version. I agree that the Pillow conversions are a bit wasteful. How does this image look like with your changes?
Hi. Original code is
fn=assets/demo.jpg, TIME=0.4375
fn=assets/hp_demo.jpg, TIME=0.2267
fn=assets/demo2.jpg, TIME=0.4976
My code is
fn=assets/demo.jpg, TIME=0.1760
fn=assets/hp_demo.jpg, TIME=0.1513
fn=assets/demo2.jpg, TIME=0.1756
'TIME' is the time from cv2.imread to cv2.imwrite(). My GPU is GeForce RTX 2070.
To draw detected object labels, convert to Pillow image object. But this process is too heavy cost. I changed draw_box() in utils.py like below,