在yolov5文件夹下打开cmd:
# source是看推理的什么,如果是图片就写图片的位置,如果是一整个文件夹的图片就写文件夹的位置,如果是0就是调用摄像头实时监测
python detect.py --data dataset/data.yaml --weights runs/train/exp/weights/best.pt --device
在yolov5文件夹下打开cmd:
# source是看推理的什么,如果是图片就写图片的位置,如果是一整个文件夹的图片就写文件夹的位置,如果是0就是调用摄像头实时监测
python detect.py --data dataset/data.yaml --weights runs/train/exp/weights/best.pt --device