When using cv2
in Dockerfile.
Adding library below to your Dockerfile to solve the issue :
RUN apt-get update
RUN apt-get install ffmpeg libsm6 libxext6 -y
mkdir coco | |
cd coco | |
mkdir images | |
cd images | |
wget http://images.cocodataset.org/zips/train2017.zip | |
wget http://images.cocodataset.org/zips/val2017.zip | |
wget http://images.cocodataset.org/zips/test2017.zip | |
wget http://images.cocodataset.org/zips/unlabeled2017.zip |
echo "Press 'q' to continue" | |
count=0 | |
while : ; do | |
read -n 1 k <&1 | |
if [[ $k = q ]] ; then | |
break | |
fi | |
done |
The function using in Scaled-YOLOv4, please refer to Scaled-YOLOv4 repository.
Before start, the export script requires onnxsim
, you need to install it first :
$ pip install -q onnx-simplifier
If You are Using MAC, I Actually Solved this Issue By Granting Permission for Terminal To Access Camera in Security and Privacy Section in System Preferences. Hope This Solves Issue In Your Mac Click Here To View Steps
#!/usr/bin/env python | |
import numpy as np | |
import os | |
import time | |
os.environ['KERAS_BACKEND'] = 'plaidml.keras.backend' | |
import keras | |
import keras.applications as kapp |