image_to_pixle_params_yoloSAM/main/readme.md

44 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 下载环境
`pip install -r requirements.txt`
## 数据集位置
`demo/image` 中存在3张`front.jpg` , `rear.jpg``side.jpg` 分别代表汽车前方、后方、侧方
## 运行代码
1. `python3 u2net_saliency.py` 将原图经过模型生成显著图
2. `python3 main.py` 将显著图进行轮胎圆轴距检测,长宽高检测
3. `python3 point.py` 将进行接触点检测
## 实际效果
#### 原始图片
<img src=".\image\front.jpg" alt="front" style="zoom:25%;" />
<img src=".\image\rear.jpg" alt="rear" style="zoom:25%;" />
<img src=".\image\side.jpg" alt="side" style="zoom:25%;" />
#### 最后结果
外接矩形和轴距检测
<img src=".\result\detected_centers_original.png" alt="detected_centers_original" style="zoom:25%;" />
<img src=".\result\side_1_size_lines_orig.png" alt="front_size_lines_orig" style="zoom:25%;" />
<img src=".\result\rear_1_size_lines_orig.png" alt="side_size_lines_orig" style="zoom:25%;" />
<img src=".\result\front_1_size_lines_orig.png" alt="rear_size_lines_orig" style="zoom:25%;" />
周围接触点检测
![side_output_rgb](.\result\side_output_rgb.png)
![front_output_rgb](.\result\front_output_rgb.png)
![rear_output_rgb](.\result\rear_output_rgb.png)