snowzach / doods

DOODS - Dedicated Open Object Detection Service
MIT License
303 stars 31 forks source link

Allocation of 1440000 exceeds 10% of free system memory #38

Closed 1ubuntuuser closed 3 years ago

1ubuntuuser commented 3 years ago

Hello, seems to be a hardcoded memory allocation somewhere when using the "tensorflow" detector.

config.yaml: all default

{"detector_name":"tensorflow","file":"/home/user/Downloads/carsmall.jpg","detect":{"car":50}} Results in...

ARM7

tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 1440000 exceeds 10% of free system memory

AMD64

2020-10-15 06:18:03.352413: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 30720000 exceeds 10% of free system memory.
2020-10-15 06:18:03.407720: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 23040000 exceeds 10% of free system memory.
2020-10-15 06:18:03.872055: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 45158400 exceeds 10% of free system memory.

Seemed to huddle through but eventually work on desktop. Crashed the arm. carsmall

Am I right in assuming TensorFlow is much more accurate but slower the default?

snowzach commented 3 years ago

It's really all about the models that are being used. The Tensorflow models are usually better and slower yes. That message is actually from the Tensorflow library and not from Doods. It can be ignored. It's just letting you know that your model is using a lot of memory. The ARM one is probably running out of memory causing the crash.

1ubuntuuser commented 3 years ago

@snowzach thanks, I did find by reducing the numThreads as suggested elsewhere the message went away.

It takes between 2.5 and 3.5 seconds to process the 800x600 image above on Raspberry Pi equivalent with the default detector. Is that reasonable?

snowzach commented 3 years ago

Yep, that's pretty typical of that detector. It uses the full resolution of the image and is easily the best model you can use. (At the cost of the speed it runs)

1ubuntuuser commented 3 years ago

Thanks a lot! the TensorFlow detector took about 13 seconds on the arm device, so I'll stick with the default one for now :).