Hi @nerk, that image is not from jetson-inference, so you would need to re-train the detection network on a dataset of construction equipment from aerial perspective.
Regarding the performance, the default detection model in jetson-inference (ssd-mobilenet-v2) was trained on the 90-class MS COCO dataset, so the model has a lot of classes. And the detection performance scales with the number of classes. So if you were to train your own model with fewer classes, it would speed it up.
Alternatively, you can look to DeepStream and training the models with Transfer Learning Toolkit for more optimized performance.
I explained incorrect, my mistake.
I would add bounding boxes, and avoid color mask on picture:
If you can fallow me to right path I will be grateful.
I tried do something like this:
import jetson.inference
import jetson.utils
import cv2
import numpy as np
net = jetson.inference.detectNet(argv=[“–output-bbox=boxes”,“–alpha=0”, “batch=5”],threshold=0.5)
camera = jetson.utils.videoSource(“csi://0”)
display = jetson.utils.videoOutput(“display://0”)
while display.IsStreaming():
img = camera.Capture()
image = img
detections = net.Detect(img)
cv_img = jetson.utils.cudaToNumpy(img)
for detection in detections:
x = detection.Left
y = detection.Right
w = detection.Bottom
h = detection.Top
OK gotcha - call net.Detect() with the overlay='none' argument, then detectNet will skip overlaying the bounding boxes, allowing you to do it in OpenCV.
Also, cudaToNumpy() maps the memory into numpy (instead of copying it), so changes that are made it in OpenCV should show up in the original memory. I believe that should allow you to skip the cudaFromNumpy() part after.