yolov8中如何修改检测框
时间: 2023-08-27 17:20:48 浏览: 584
yolov8所有的检测模型都可以转onnx代码
在YOLOv8中修改检测框的代码位置是。具体的修改内容如下:
```
color = (_COLORS * 255).astype(np.uint8).tolist()
text = '{}:{:.1f}%'.format(class_names #第一个数字1代表文字背景块大小
cv2.rectangle(img, (x0, y0), (x1, y1), color, 1) #最后一个数字1代表框的粗细
txt_bk_color = (_COLORS * 255 * 0.7).astype(np.uint8).tolist()
cv2.rectangle(img, (x0, y0 - 1), (x0 + txt_size - 1, y0 - int(1.5 * txt_size<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [YOLOX修改检测框、标签文字的粗细大小和标签百分比显示](https://blog.csdn.net/m0_63215456/article/details/128336686)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [yolov5 摔倒检测 跌倒识别](https://download.csdn.net/download/h4934560/86086672)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文