Hi
I have trained yolov7 tiny model. I have tested it and its running fine and detecting all the objects. I have now converted best.pt
file into best.onnx
file. I am running the onnx file using below code, it generates .engine
file and loads up the video fine.
import jetson.inference
import jetson.utils
from jetson_utils import cudaAllocMapped
net = jetson.inference.detectNet(model="/home/andrew/Documents/Test/best.onnx",
labels="/home/andrew/Documents/Test/labels.txt", input_blob="images", output_cvg="num_dets",
output_bbox="det_boxes", threshold=0.2)
camera = jetson.utils.videoSource("/home/andrew/Documents/video/D2.mp4")
display = jetson.utils.videoOutput("display://0")
while display.IsStreaming():
img = camera.Capture()
print("Original size {} {}".format(img.width, img.height))
frame = cudaAllocMapped(width=img.width * 0.333, height=img.height * 0.444, format=img.format)
cudaResize(img, frame)
print(frame.width, frame.height)
detections = net.Detect(frame)
print(detections)
display.Render(frame)
display.SetStatus("Object Detection | Network {:.0f} FPS".format(net.GetNetworkFPS()))
Everything is working fine. There is no error shown while building the engine file and at the end it also loads up the video file. But there is no detection happening. It doesn’t draw any bbox or show any object name. The above code is taken from jetson-inference/detectnet-example-2.md at master · dusty-nv/jetson-inference · GitHub
We have only updated the output_cvg
. Is there anything I am missing. Please help. Thanks