object - 计算并显示找到的对象的百分比
问题描述
下面是我在 google Colab 上使用的代码,该代码给了我检测到的每种产品的总数,我可以添加什么来显示百分比而不是总数?将不胜感激任何帮助,谢谢
import torch
# Model
model = torch.hub.load('ultralytics/yolov5', 'custom',
path='/content/yolov5/runs/train/exp/weights/best.pt') # default
# Image
imgs = '/content/20210921_161048_4.jpg'
# Inference
results = model(imgs)
results.print()
解决方案
推荐阅读
- android - 按下主页按钮时如何停止服务?
- java - Java:如何在变量中“存储”getter?
- node.js - 用户登录在 Angular 中无法正常工作?
- python - 基于参数的模拟 sqlalchemy 查询。例如:db.session.query(Model.id)
- r - 如何将打印值放入矩阵
- android - 如何在 Hilt 中生成相同类型的对象?
- reactjs - React – 如何有条件地返回一个值(或回退)
- java - AndroidOS中imageview.getImageMatrix()的HarmonyOS替代方法是什么
- reactjs - 通过 React 中自定义事件的详细信息传输的输出数据
- java - 我们可以在数据库中的模式内有模式吗