Extreme memory usage and bug with FP16 and darkflow_utils
See original GitHub issueWhen using YOLOv2 COCO or VOC on tensornets (TF 1.7, CPU, Win 10) the memory usage with the input as tf.float32
is massive (3GB +) which is more than twice what darkflow uses for the same model. Not quite sure why.
When trying to use tf.float16
with YOLOv2, memory usage is significantly reduced (could be due to a bug that so little memory is used actually…), but there seems to be a problem with the Cython utils ported from darkflow handling the FP16 output data.
I get the following error:
Traceback (most recent call last): File “blah\src\test.py”, line 15, in <module> boxes = model.get_boxes(preds, img.shape[1:3]) File “C:\Users\abags\AppData\Local\Programs\Python\Python36\lib\site-packages\tensornets\references\yolos.py”, line 189, in _get_boxes return get_v2_boxes(opts(‘yolov2’), *args, **kwargs) File “C:\Users\abags\AppData\Local\Programs\Python\Python36\lib\site-packages\tensornets\references\yolo_utils.py”, line 94, in get_v2_boxes results = yolov2_box(opts, outs[0].copy()) File “tensornets\references\darkflow_utils\get_boxes.pyx”, line 108, in tensornets.references.darkflow_utils.get_boxes.yolov2_box ValueError: Does not understand character buffer dtype format string (‘e’)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
OK, @abagshaw. I am going to investigate Python 3.6.
@taehoonlee Thanks so much for all that work. Yes, I suppose this must be a Windows problem - oh well 😄