conda install pytorch torchvision cpuonly -c pytorch
pip install torch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0
pip isntall -r requirement.txt
pip install PyQt5
pip install opencv-python
pip install matplotlib
python detect.py --source data/images/bus.jpg --weights pretrained/yolov5s.pt
程序会创建runs文件夹,runs/detect/exp/目录下的图片bus.jpg是程序输出的结果。每运行一次detect.py,就会产生一个用来存放结果的新文件夹。yolov5 服务器运行报错:ImportError: libGL.so.1: cannot open shared object file: No such file or directory
解决方法:------ 2023-10-21 星期六 21:49:58 ------
LabelImg工具是一款图像标注工具,可方便创建自己的数据集,方便进行深度学习训练。它是用Python编写的,并将Qt用于其图形界面。
安装命令:qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even though it was found
这句话意思是Qt应用程序时缺少xcb平台插件。这可能是因为未安装相应的Qt平台插件库,或者环境变量未正确设置。可以通过一下命令解决:sudo apt-get install libxcb-xinerama0
------ 2023-10-23 星期一 15:25:06 ------
python train.py --data mask_data.yaml --cfg mask_yolov5s.yaml --weights pretrained/yolov5s.pt --epoch 100 --batch-size 4 --device cpu
python val.py --data data/mask_data.yaml --weights runs/train/exp_yolov5s/weights/best.pt --img 640
python detect.py --weights runs/train/exp_yolov5s/weights/best.pt --source 0
python detect.py --weights runs/train/exp_yolov5s/weights/best.pt --source file.jpg
python detect.py --weights runs/train/exp_yolov5s/weights/best.pt --source file.mp4
python detect.py --weights runs/train/exp_yolov5s/weights/best.pt path/
python detect.py --weights runs/train/exp_yolov5s/weights/best.pt 'https://youtu.be/NUsoVlDFqZg'
python detect.py --weights runs/train/exp_yolov5s/weights/best.pt 'rtsp://example.com/media.mp4'
------ 2023-10-23 星期一 16:29:12 ------