首页 > 编程知识 正文

halcon算子中文手册,pic格式图片批量改

时间:2023-05-06 03:17:44 阅读:138013 作者:464

fromargparseimportargumentparserimportosfrommdet.apisimportinference _ detector,init_detector #, show _ result _ pyplotimportcv2def show _ result _ py plot (model,img,result,score_thr=0.3, fig_size=(15 ) 15 10 ) :“”“visualizethedetectionresultsontheimage.args :模型(nn.module ) 3360 theloadeded 0 imagefilenameorloadedimage.result (tuple [ list ] or list ) : The detection result,canbeeither ) bbox,原始设备3360 figuresizeofthepyplotfigure.' ' if hasattr (model,' module ' ) : model=model.module img=model.show _ re SSE show=false(returnimgdefmain ) : # config文件config _ file='/root/mm detection/work _ dirs/faster _ rcnn _ rcn 训练的模型check point _ file='/root/mm detection/work _ dirs/faster _ model=init _ detector (config _ file,chech ) check point _ fille device=' cuda :0 ' ) #检测到图像路径name='/root/mm detection/data/coco/val 2017/00088.jpg ' #后ral ' ifno tos.path.exists (out_dir ) :OS.mkdir ) out _ dir ) result=inference_detector ) model,name ) ime

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。