snowzach / doods

DOODS - Dedicated Open Object Detection Service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when trying to use Coral USB edgetpu

TrungLam opened this issue · comments

commented

Error:

$ docker run -it --name doods -p 6060:8080 -v /opt/doods/src/doods-0.2.1/models:/opt/doods/models -v /opt/doods/src/doods-0.2.1/example.yaml:/opt/doods/config.yaml -v /dev/bus/usb:/dev/bus/usb snowzach/doods:latest
2020-07-31T06:57:08.959Z	ERROR	detector/detector.go:73	Could not initialize detector default: no edgetpu devices detected	{"package": "detector"}
2020-07-31T06:57:08.960Z	FATAL	detector/detector.go:83	No detectors configured	{"package": "detector"}

My config:

doods:
  detectors:
    - name: default
      type: tflite
      modelFile: models/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite
      labelFile: models/coco_labels0.txt
      numThreads: 0
      numConcurrent: 4
      hwAccel: true

I'm using a Proxmox host to passthrough my VM that hosts a bunch of docker containers. Which is another layer of potential issues, but I've been able to do usb passthrough with a aeotec z-wave usb controller.

This is what lsusb looks like on the VM

Bus 001 Device 007: ID 1a6e:089a Global Unichip Corp. 
Bus 001 Device 003: ID 0624:0249 Avocent Corp. Virtual Keyboard/Mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0658:0200 Sigma Designs, Inc. 
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0627:0001 Adomax Technology Co., Ltd 
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Do you have any advice?

commented

Nvm, looks like after installing drivers on host and vm, not sure if both was necessary... I was able to redo the passthrough, restart the vm and lsusb looks like this:

Bus 001 Device 004: ID 18d1:9302 Google Inc. 
Bus 001 Device 003: ID 0624:0249 Avocent Corp. Virtual Keyboard/Mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0658:0200 Sigma Designs, Inc. 
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0627:0001 Adomax Technology Co., Ltd 
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Everything is working now :D

2020-07-31T07:12:27.787Z	INFO	detector/detector.go:78	Configured Detector	{"package": "detector", "name": "default", "type": "tflite-edgetpu", "model": "models/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite", "labels": 80, "width": 300, "height": 300}
2020-07-31T07:12:27.792Z	INFO	server/server.go:274	API Listening	{"package": "server", "address": ":8080", "tls": false, "version": "v0.2.1-0-g91828a0-dirty"}
commented

Yeah, you usually just use --device /dev/bus/usb and the first time it runs it actually installs some driver and it changes from Global Unichip to Google and it will sometimes fail to start doods. If you have docker automatically restart the container then it goes.

commented

Yeah also running it with --device /dev/bus/usb now too. Thanks for setting this package and docker up. Very easy to use!