Hi all,
Yesterday I installed a coral m.2 TPU in my proxmox rig and shared it with the Blueiris VM.
It's detected fine, and I've been using it overnight - by default it seems to suck at detections compared to what I had previously, its faster but less accurate. It thinks my pool is an umbrealla and my roller door an airplane.
I guess its very sensitive. I've swapped to the Yolov8 model, and I'm encountering the following errors when I Try to run it with a medium model size:
Any suggestions here on how to fix this but also how to perhaps get YoloV8 working with a better model ? even with the small model I'm still seeing weird detections that I never saw previously.
Thanks in advance!
Yesterday I installed a coral m.2 TPU in my proxmox rig and shared it with the Blueiris VM.
It's detected fine, and I've been using it overnight - by default it seems to suck at detections compared to what I had previously, its faster but less accurate. It thinks my pool is an umbrealla and my roller door an airplane.
I guess its very sensitive. I've swapped to the Yolov8 model, and I'm encountering the following errors when I Try to run it with a medium model size:
Code:
11:55:59:Client request 'detect' in queue 'objectdetection_queue' (...d4dcc7)
11:56:00:Update ObjectDetectionCoral. Setting AutoStart=true
11:56:00:Restarting Object Detection (Coral) to apply settings change
11:56:00:Running module using: C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\bin\windows\python39\venv\Scripts\python
11:56:00:
11:56:00:Attempting to start ObjectDetectionCoral with C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\bin\windows\python39\venv\Scripts\python "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\objectdetection_coral_adapter.py"
11:56:00:Starting C:\Program Files...ws\python39\venv\Scripts\python "C:\Program Files...ectdetection_coral_adapter.py"
11:56:00:
11:56:00:Module 'Object Detection (Coral)' 2.2.0 (ID: ObjectDetectionCoral)
11:56:00:Valid: True
11:56:00:Module Path: <root>\modules\ObjectDetectionCoral
11:56:00:AutoStart: True
11:56:00:Queue: objectdetection_queue
11:56:00:Runtime: python3.9
11:56:00:Runtime Loc: Local
11:56:00:FilePath: objectdetection_coral_adapter.py
11:56:00:Start pause: 1 sec
11:56:00:Parallelism: 1
11:56:00:LogVerbosity:
11:56:00:Platforms: all
11:56:00:GPU Libraries: installed if available
11:56:00:GPU Enabled: enabled
11:56:00:Accelerator:
11:56:00:Half Precis.: enable
11:56:00:Environment Variables
11:56:00:CPAI_CORAL_MODEL_NAME = YOLOv8
11:56:00:CPAI_CORAL_MULTI_TPU = True
11:56:00:MODELS_DIR = <root>\modules\ObjectDetectionCoral\assets
11:56:00:MODEL_SIZE = medium
11:56:00:
11:56:00:Started Object Detection (Coral) module
11:56:02:objectdetection_coral_adapter.py: MODULE_PATH: C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral
11:56:02:objectdetection_coral_adapter.py: ERROR:root:TFLite file C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\assets\yolov8m-int8_edgetpu.tflite doesn't exist
11:56:02:objectdetection_coral_adapter.py: MODELS_DIR: C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\assets
11:56:02:objectdetection_coral_adapter.py: CPAI_CORAL_MODEL_NAME: yolov8
11:56:02:objectdetection_coral_adapter.py: MODEL_SIZE: medium
11:56:02:objectdetection_coral_adapter.py: CPU_MODEL_NAME: yolov8m-int8.tflite
11:56:02:objectdetection_coral_adapter.py: Running init for Object Detection (Coral)
11:56:02:objectdetection_coral_adapter.py: TPU detected
11:56:02:objectdetection_coral_adapter.py: TPU_MODEL_NAME: yolov8m-int8_edgetpu.tflite
11:56:02:objectdetection_coral_adapter.py: Attempting multi-TPU initialisation
11:56:02:objectdetection_coral_adapter.py: An exception occurred initialising the module: local variable 'ex' referenced before assignment
11:56:02:Request 'detect' dequeued from 'objectdetection_queue' (...6e61bf)
11:56:02:Request 'detect' dequeued from 'objectdetection_queue' (...ecc02f)
11:56:02:Request 'detect' dequeued from 'objectdetection_queue' (...0f50b6)
11:56:02:Object Detection (Coral): Retrieved objectdetection_queue command 'detect'
11:56:02:Object Detection (Coral): Retrieved objectdetection_queue command 'detect'
11:56:02:Request 'detect' dequeued from 'objectdetection_queue' (...588f78)
11:56:02:Response rec'd from Object Detection (Coral) command 'detect' (...ecc02f)
11:56:02:Object Detection (Coral): [AttributeError] : Error during main_loop: Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\../../SDK/Python\module_runner.py", line 622, in main_loop
self.update_statistics(output)
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\objectdetection_coral_adapter.py", line 128, in update_statistics
self._num_items_found += len(predictions)
AttributeError: 'CoralObjectDetector_adapter' object has no attribute '_num_items_found'
11:56:02:Object Detection (Coral): Retrieved objectdetection_queue command 'detect'
11:56:02:Request 'detect' dequeued from 'objectdetection_queue' (...943e44)
11:56:02:Object Detection (Coral): [AttributeError] : Error during main_loop: Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\../../SDK/Python\module_runner.py", line 622, in main_loop
self.update_statistics(output)
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\objectdetection_coral_adapter.py", line 128, in update_statistics
self._num_items_found += len(predictions)
AttributeError: 'CoralObjectDetector_adapter' object has no attribute '_num_items_found'
11:56:02:Response rec'd from Object Detection (Coral) command 'detect' (...0f50b6)
11:56:02:Object Detection (Coral): Retrieved objectdetection_queue command 'detect'
11:56:02:Request 'detect' dequeued from 'objectdetection_queue' (...d4dcc7)
11:56:03:Response rec'd from Object Detection (Coral) command 'detect' (...588f78)
11:56:03:Object Detection (Coral): [AttributeError] : Error during main_loop: Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\../../SDK/Python\module_runner.py", line 622, in main_loop
self.update_statistics(output)
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\objectdetection_coral_adapter.py", line 128, in update_statistics
self._num_items_found += len(predictions)
AttributeError: 'CoralObjectDetector_adapter' object has no attribute '_num_items_found'
11:56:03:Object Detection (Coral): Retrieved objectdetection_queue command 'detect'
11:56:03:Object Detection (Coral): [AttributeError] : Error during main_loop: Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\../../SDK/Python\module_runner.py", line 622, in main_loop
self.update_statistics(output)
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\objectdetection_coral_adapter.py", line 128, in update_statistics
self._num_items_found += len(predictions)
AttributeError: 'CoralObjectDetector_adapter' object has no attribute '_num_items_found'
11:56:03:Response rec'd from Object Detection (Coral) command 'detect' (...943e44)
11:56:03:Response rec'd from Object Detection (Coral) command 'detect' (...d4dcc7)
11:56:03:Object Detection (Coral): [AttributeError] : Error during main_loop: Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\../../SDK/Python\module_runner.py", line 622, in main_loop
self.update_statistics(output)
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\objectdetection_coral_adapter.py", line 128, in update_statistics
self._num_items_found += len(predictions)
AttributeError: 'CoralObjectDetector_adapter' object has no attribute '_num_items_found'
11:56:04:Client request 'detect' in queue 'objectdetection_queue' (...2dec1b)
11:56:04:Request 'detect' dequeued from 'objectdetection_queue' (...2dec1b)
11:56:04:Object Detection (Coral): Retrieved objectdetection_queue command 'detect'
11:56:05:Object Detection (Coral): [AttributeError] : Error during main_loop: Traceback (most recent call last):
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\../../SDK/Python\module_runner.py", line 622, in main_loop
self.update_statistics(output)
File "C:\Program Files\CodeProject\AI\modules\ObjectDetectionCoral\objectdetection_coral_adapter.py", line 128, in update_statistics
self._num_items_found += len(predictions)
AttributeError: 'CoralObjectDetector_adapter' object has no attribute '_num_items_found'
11:56:05:Response rec'd from Object Detection (Coral) command 'detect' (...2dec1b)
11:56:08:Update ObjectDetectionCoral. Setting AutoStart=false
11:56:08:Stopping Object Detection (Coral)
11:56:08:Client request 'Quit' in queue 'objectdetection_queue' (...a0f70b)
11:56:08:Request 'Quit' dequeued from 'objectdetection_queue' (...a0f70b)
11:56:08:Sending shutdown request to python/ObjectDetectionCoral
11:56:12:Object Detection (Coral): Retrieved objectdetection_queue command 'Quit'
11:56:12:objectdetection_coral_adapter.py: Object Detection (Coral) started.
11:56:12:objectdetection_coral_adapter.py: no TPU interpreters: Falling back to CPU detection
11:56:12:objectdetection_coral_adapter.py: No interpreter found. Recreating.
11:56:12:objectdetection_coral_adapter.py: Model change detected. Forcing model reload.
11:56:12:objectdetection_coral_adapter.py: Input details: {'name': 'normalized_input_image_tensor', 'index': 0, 'shape': array([ 1, 320, 320, 3]), 'shape_signature': array([ 1, 320, 320, 3]), 'dtype': , 'quantization': (0.0078125, 128), 'quantization_parameters': {'scales': array([0.0078125], dtype=float32), 'zero_points': array([128]), 'quantized_dimension': 0}, 'sparsity_parameters': {}}
11:56:12:objectdetection_coral_adapter.py: Output details: {'name': 'TFLite_Detection_PostProcess', 'index': 6, 'shape': array([ 1, 100, 4]), 'shape_signature': array([ 1, 100, 4]), 'dtype': , 'quantization': (0.0, 0), 'quantization_parameters': {'scales': array([], dtype=float32), 'zero_points': array([], dtype=int32), 'quantized_dimension': 0}, 'sparsity_parameters': {}}
11:56:12:objectdetection_coral_adapter.py: no TPU interpreters: Falling back to CPU detection
11:56:12:objectdetection_coral_adapter.py: no TPU interpreters: Falling back to CPU detection
11:56:12:objectdetection_coral_adapter.py: no TPU interpreters: Falling back to CPU detection
11:56:12:objectdetection_coral_adapter.py: no TPU interpreters: Falling back to CPU detection
11:56:12:objectdetection_coral_adapter.py: no TPU interpreters: Falling back to CPU detection
11:56:12:Client request 'detect' in queue 'objectdetection_queue' (...0bb031)
11:56:12:Module ObjectDetectionCoral has shutdown
11:56:12:objectdetection_coral_adapter.py: has exited
Any suggestions here on how to fix this but also how to perhaps get YoloV8 working with a better model ? even with the small model I'm still seeing weird detections that I never saw previously.
Thanks in advance!