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
# Linux and MacOS | |
export GOOGLE_APPLICATION_CREDENTIALS="[PATH]" | |
# Windows cmd | |
set GOOGLE_APPLICATION_CREDENTIALS=[PATH] | |
# Windows PowerShell | |
$env:GOOGLE_APPLICATION_CREDENTIALS="[PATH]" |
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
pip install --upgrade google-cloud-vision Pillow |
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
from google.cloud import vision | |
from PIL import Image, ImageDraw | |
import io | |
import os |
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
# We create the vision image annotator client | |
# This line authenticates you using the keyfile stored | |
# in your environment and presents you with an object that | |
# can talk to autoML | |
client = vision.ImageAnnotatorClient() | |
def detect_license_plate(path): | |
"""Detects document features in an image.""" | |
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
client = vision.ImageAnnotatorClient() | |
def mask_faces(path): | |
"""Detects faces in an image.""" | |
with io.open(path, 'rb') as image_file: | |
content = image_file.read() | |
image = vision.types.Image(content=content) |
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
sudo docker run hello-world |
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
[application] | |
enable-perf-measurement=1 | |
perf-measurement-interval-sec=1 | |
[source0] | |
enable=1 | |
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP | |
type=3 | |
uri=file://../data/towncentre.mp4 | |
num-sources=1 |
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
[property] | |
gpu-id=0 | |
net-scale-factor=0.0039215697906911373 | |
model-file=/opt/nvidia/deepstream/deepstream/samples/models/Primary_Detector/resnet10.caffemodel | |
proto-file=/opt/nvidia/deepstream/deepstream/samples/models/Primary_Detector/resnet10.prototxt | |
model-engine-file=../engines/resnet10.caffemodel_b30_gpu0.engine | |
labelfile-path=/opt/nvidia/deepstream/deepstream/samples/models/Primary_Detector/labels.txt | |
int8-calib-file=/opt/nvidia/deepstream/deepstream/samples/models/Primary_Detector/cal_trt.bin | |
force-implicit-batch-dim=1 | |
batch-size=1 |
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
[property] | |
gpu-id=0 | |
net-scale-factor=0.0039215697906911373 | |
model-color-format=0 | |
custom-network-config=/opt/nvidia/deepstream/deepstream/sources/project/weights/yolov4.cfg | |
model-file=/opt/nvidia/deepstream/deepstream/sources/project/weights/yolov4.weights | |
model-engine-file=model_b1_gpu0_fp16.engine | |
labelfile-path=labels.txt | |
batch-size=1 | |
network-mode=2 |
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
[primary-gie] | |
enable=1 | |
gpu-id=0 | |
gie-unique-id=1 | |
nvbuf-memory-type=0 | |
config-file=model_yolo.txt |
OlderNewer