Worked yesterday, today ValueError: Could not open '~/google-coral/examples-camera/all_models/mobilenet_ssd_v1_face_quant_postprocess_edgetpu.tflite'. #110
Labels
comp:model
Model related isssues
comp:thirdparty
Thirdparty related issues
Hardware:USB Accelerator
Coral USB Accelerator issues
subtype:ubuntu/linux
Ubuntu/Linux Build/installation issues
type:support
Support question or issue
Description
I was running the last several days modifying opencv/detect.py for three usb cameras. All went well. I also modified it to just gather images with no inference. Grabbed a couple thousand images yesterday and tried to post-process and got the above error. Today same thing. I deleted and reinstalled the entire camera examples folder including downloading all models again. No joy.
Changed models to v1 and to face, same issue.
RPi4, coral usb plugged into blue jacks, updated raspbian etc (like I said, worked yesterday).
Since it worked yesterday, I don't think it is a bug in this code, but I am at a loss of what it could be. I am running it from a separate folder but changed the model folder to the correct one. See below.
This works:
`
import cv2
import time
import datetime
import argparse
import os
def main():
default_save_dir = './images'
if name == 'main':
main()
`
This does not. Error below
`
v4l2-ctl --list-devices
import cv2
import time
import datetime
import argparse
import os
from pycoral.adapters.common import input_size
from pycoral.adapters.detect import get_objects
from pycoral.utils.dataset import read_label_file
from pycoral.utils.edgetpu import make_interpreter
from pycoral.utils.edgetpu import run_inference
def main():
default_model_dir = '~/google-coral/examples-camera/all_models'
default_model = 'mobilenet_ssd_v1_face_quant_postprocess_edgetpu.tflite'
default_labels = 'coco_labels.txt'
parser = argparse.ArgumentParser()
parser.add_argument('--model', help='.tflite model path',
default=os.path.join(default_model_dir,default_model))
parser.add_argument('--labels', help='label file path',
default=os.path.join(default_model_dir, default_labels))
parser.add_argument('--top_k', type=int, default=3,
help='number of categories with highest score to display')
parser.add_argument('--camera_idx', type=int, help='Index of which video source to use. ', default = 0)
parser.add_argument('--threshold', type=float, default=0.1,
help='classifier score threshold')
args = parser.parse_args()
default_save_dir = './images'
def append_objs_to_img(cv2_im, inference_size, objs, labels):
height, width, channels = cv2_im.shape
scale_x, scale_y = width / inference_size[0], height / inference_size[1]
for obj in objs:
bbox = obj.bbox.scale(scale_x, scale_y)
x0, y0 = int(bbox.xmin), int(bbox.ymin)
x1, y1 = int(bbox.xmax), int(bbox.ymax)
`
if name == 'main':
main()
Click to expand!
Issue Type
Support
Operating System
Ubuntu
Coral Device
USB Accelerator
Other Devices
Rapsberry Pi 4
Programming Language
No response
Relevant Log Output
The text was updated successfully, but these errors were encountered: