img = sensor.snapshot()
for i, detection_list in enumerate(net.predict([img], callback=fomo_post_process)):
if i == 0: continue # background class
if len(detection_list) == 0: continue # no detections for this class?
print("This is %s " % labels[i])
# for x, y, w, h, score in detection_list:
# center_x = math.floor(x + (w / 2))
# center_y = math.floor(y + (h / 2))
# print(f"x {center_x}\ty {center_y}\tscore {score}")
# img.draw_circle((center_x, center_y, 12), color=colors[i])
#print(clock.fps(), "fps", end="\n\n")
# uart3.write("This is %s " % labels[i])
img_compressed = img.compress(quality=(50))
size = ustruct.pack("<L", len(img_compressed))
for xxx in range(0,len(img_compressed),500):
uart3.write(size)
uart3.write(b';')
uart3.write(img_compressed)
time.sleep(1)
O
ogdm
@ogdm
0
声望
3
楼层
318
资料浏览
0
粉丝
0
关注
ogdm 发布的帖子
-
如何将jpg数据分片成500字节大小,以便通过NB通讯发送到服务器?
-
USB_VCP()例程,脱机运行后,用串口助手没有输出,采用putty就输出正常,什么问题?需要做什么设置
USB_VCP()例程,脱机运行后,用串口助手没有输出,采用putty就输出正常,什么问题?上位机通讯编程的时候,需要做什么设置