---
title: yolov8s-hard-hat
canonical_url: "https://www.modelscope.cn/models/wuqiyang312/yolov8s-hard-hat"
md_url: "https://www.modelscope.cn/models/wuqiyang312/yolov8s-hard-hat.md"
repository: wuqiyang312/yolov8s-hard-hat
chinese_name: "安全帽检测模型"
last_updated: 2024-11-02
license: "Apache License 2.0"
pipeline_tag: image-object-detection
tasks:
  - image-object-detection
model_type:
  - v8
library_name:
  - pytorch
frameworks:
  - Pytorch
language:
  - cn
downloads: 52
stars: 4
tags:
  - yolov8
  - ultralytics
---

# yolov8s-hard-hat

> yolov8s-hard-hat - wuqiyang312 在 ModelScope 开源的模型。yolov8s模型的安全帽检测模型

wuqiyang312/yolov8s-hard-hat 是 ModelScope 魔搭社区上的image-object-detection模型，采用 Apache License 2.0 许可。

- **Repository**: wuqiyang312/yolov8s-hard-hat
- **License**: Apache License 2.0
- **Tasks**: image-object-detection
- **Tags**: yolov8, ultralytics
- **Downloads**: 52
- **Stars**: 4
- **Last updated**: 2024-11-02

Source: https://www.modelscope.cn/models/wuqiyang312/yolov8s-hard-hat

---

### 可浏览“模型文件”页面获取best.pt。


#### classes
```python
[0,1]
```
0=Hardhat

1=NO-Hardhat

#### 使用下载模型方法:
“模型文件”页面下载:

下载文件名: `best.pt`

```python
# 加载模型
model = YOLO("best.pt")

# ……中间代码

# 将图像输入到YOLOv8模型中，得到检测结果
results = model(frame, device="cpu", classes = [0,1])
```

SDK下载:
```bash
#安装ModelScope
pip install modelscope
```
```python
#SDK模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('wuqiyang312/yolov8s-hard-hat')
```
Git下载:
```
#Git模型下载
git clone https://www.modelscope.cn/wuqiyang312/yolov8s-hard-hat.git
```
