Hi
I tried changing input size parameter to 320 here as suggested by you.
However unfortunately that did not work, and I got below error
line 38, in parse_detections
postprocess_nanodet_detection(outputs=np_outputs[0], conf=threshold, iou_thres=iou,
File "/usr/lib/python3/dist-packages/picamera2/devices/imx500/postprocess_nanodet.py", line 38, in postprocess_nanodet_detection
distances = x * anchors[..., 2, None]
~~^~~~~~~~~~~~~~~~~~~~~~~
ValueError: operands could not be broadcast together with shapes (1,0,4) (1,3598,1)
I suspect, may be just changing input_size parameter may not work, because perhaps strides and other parameter shall also change accordingly, but I don't know what should be the values for that?
perhaps, logic in below may have to be changed appropriately
# Extract feature map sizes
# Decode bboxes
Is it possible to get the imx500 postprocessor script and sample examples in Raspi Ai cam in picamera2 for the all nanodet architecture models from here : https://github.com/RangiLyu/nanodet/tree/main, I see this repo has been referenced in picamera2/devices/imx500/postprocess_nanodet.py
I tried changing input size parameter to 320 here as suggested by you.
Code:
featmap_sizes = [(np.ceil(320 / stride), np.ceil(320 / stride)) for stride in strides]
line 38, in parse_detections
postprocess_nanodet_detection(outputs=np_outputs[0], conf=threshold, iou_thres=iou,
File "/usr/lib/python3/dist-packages/picamera2/devices/imx500/postprocess_nanodet.py", line 38, in postprocess_nanodet_detection
distances = x * anchors[..., 2, None]
~~^~~~~~~~~~~~~~~~~~~~~~~
ValueError: operands could not be broadcast together with shapes (1,0,4) (1,3598,1)
I suspect, may be just changing input_size parameter may not work, because perhaps strides and other parameter shall also change accordingly, but I don't know what should be the values for that?
perhaps, logic in below may have to be changed appropriately
# Extract feature map sizes
# Decode bboxes
Is it possible to get the imx500 postprocessor script and sample examples in Raspi Ai cam in picamera2 for the all nanodet architecture models from here : https://github.com/RangiLyu/nanodet/tree/main, I see this repo has been referenced in picamera2/devices/imx500/postprocess_nanodet.py
Statistics: Posted by Yogesh432b430pc — Mon Nov 11, 2024 1:27 pm