Skip to content

An error while starting ObjectDetectionCoral with multi-file models #6

@serg987

Description

@serg987

Area of Concern

  • Server
  • Behaviour of ObjectDetectionCoral
  • Installer
  • Runtime [e.g. Python3.7, .NET]
  • Module packages [e.g. PyTorch)
  • Something else

Describe the bug
Steps to repro:
Download YOLOv5 Medium or YOLOv8 Medium Models through UI
Restart ObjectDetectionCoral

Actual behavior
Failed to load the model, cannot find asset files
Logs for YOLOv8 Medium

22:39:54:CPAI_CORAL_MODEL_NAME = YOLOv8
22:39:54:CPAI_CORAL_MULTI_TPU  = True
22:39:54:MODELS_DIR            = <root>/modules/ObjectDetectionCoral/assets
22:39:54:MODEL_SIZE            = medium
22:39:54:
22:39:54:Started Object Detection (Coral) module
22:39:55:objectdetection_coral_adapter.py: ERROR:root:TFLite file /app/modules/ObjectDetectionCoral/assets/yolov8m__segment_0_of_2_edgetpu.tflite doesn't exist
22:39:55:objectdetection_coral_adapter.py: WARNING:root:Model file not found: [Errno 2] No such file or directory: '/app/modules/ObjectDetectionCoral/assets/yolov8m__segment_0_of_2_edgetpu.tflite'
22:39:55:objectdetection_coral_adapter.py: WARNING:root:No Coral TPUs found or able to be initialized. Using CPU.
22:39:55:objectdetection_coral_adapter.py: ERROR:root:TFLite file /app/modules/ObjectDetectionCoral/assets/yolov8m-416_640px.tflite doesn't exist
22:39:55:objectdetection_coral_adapter.py: WARNING:root:Unable to create interpreter for CPU using edgeTPU library: [Errno 2] No such file or directory: '/app/modules/ObjectDetectionCoral/assets/yolov8m-416_640px.tflite'

Logs for YOLOv5 Medium:

23:04:00:CPAI_CORAL_MODEL_NAME = YOLOv5
23:04:00:CPAI_CORAL_MULTI_TPU  = True
23:04:00:MODELS_DIR            = <root>/modules/ObjectDetectionCoral/assets
23:04:00:MODEL_SIZE            = medium
23:04:00:
23:04:00:Started Object Detection (Coral) module
23:04:01:objectdetection_coral_adapter.py: ERROR:root:TFLite file /app/modules/ObjectDetectionCoral/assets/yolov5m-int8_edgetpu_segment_0_of_4_edgetpu.tflite doesn't exist
23:04:01:objectdetection_coral_adapter.py: WARNING:root:Model file not found: [Errno 2] No such file or directory: '/app/modules/ObjectDetectionCoral/assets/yolov5m-int8_edgetpu_segment_0_of_4_edgetpu.tflite'
23:04:01:objectdetection_coral_adapter.py: WARNING:root:No Coral TPUs found or able to be initialized. Using CPU.
23:04:01:objectdetection_coral_adapter.py: WARNING:root:Unable to load delegate for TPU cpu: Failed to load delegate from libedgetpu.so.1
23:04:01:objectdetection_coral_adapter.py: WARNING:root:Unable to create interpreter for CPU using edgeTPU library: cpu

Looks like there's a discrepancy between what the module wants and what is actually in assets;

there's no yolov8m__segment_0_of_2_edgetpu.tflite, but yolov8m_416_640px_segment_0_of_2_edgetpu.tflite

no yolov8m-416_640px.tflite, but yolov8m_416_640px.tflite

no yolov5m-int8_edgetpu_segment_0_of_4_edgetpu.tflite, but yolov5m-int8_segment_0_of_4.tflite

After manually renaming the files it works well.

Though interesting - as it wants yolov8m__segment_0_of_2_edgetpu.tflite for the first segment, for the second one it wants the existing yolov8m_416_640px_segment_1_of_2_edgetpu.tflite. For YOLOv5 all files were renamed to make it work.

Expected behavior
ObjectDetectionCoral should start with the multi-file model

Screenshots
YOLOv5 logs:
240418-2

YOLOv8 logs;
240418-1

ls assets/:
240418-3

Your System (please complete the following information):

  • CodeProject.AI Server version: 2.6.2 in Docker
  • OS: Debian 12
  • System RAM: 32Gb
  • no GPU
  • 4xCoral TPU PCIe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions