Created
September 9, 2020 23:26
-
-
Save igorrendulic/94b667f211bac26b97afac486514b645 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
from tensorflow.keras.applications.mobilenet_v2 import preprocess_input | |
from tensorflow.keras.preprocessing.image import img_to_array | |
from tensorflow.keras.models import load_model | |
import numpy as np | |
import imutils | |
import cv2 | |
import os | |
import time | |
import chrysalis | |
# issue for RTX GPU: https://github.com/tensorflow/tensorflow/issues/24496 | |
os.environ['CUDA_VISIBLE_DEVICES'] = '-1' | |
gpu_devices = tf.config.experimental.list_physical_devices("GPU") | |
for device in gpu_devices: | |
tf.config.experimental.set_memory_growth(device, True) | |
os.environ['DISPLAY'] = ":0" | |
default_confidence = 0.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment