Hi vital ,
If your ocr.json has label mappings, your code should work.
def cb(packet: DetectionPacket):
text = ''
for dets in packet.detections:
text += dets.label
print(text)
In my case it printed "laptoppersonperson" (as it found a laptop and 2 people). Just note that using object detection model for OCR isn't really ideal (which you would quickly find out), I would suggest looking at text detection + text recognition models instead, eg. https://github.com/luxonis/depthai-experiments/tree/master/gen2-ocr
Thoughts?
Thanks, Erik