---
title: trademark_detect
canonical_url: "https://www.modelscope.cn/models/SDT/trademark_detect"
md_url: "https://www.modelscope.cn/models/SDT/trademark_detect.md"
repository: SDT/trademark_detect
chinese_name: "商标检测模型"
last_updated: 2026-01-28
pipeline_tag: image-object-detection
tasks:
  - image-object-detection
library_name:
  - pytorch
frameworks:
  - Pytorch
downloads: 3
stars: 1
---

# trademark_detect

> trademark_detect - SDT 在 ModelScope 开源的模型。用于检测一张商品图上的商标

- **Repository**: SDT/trademark_detect
- **Tasks**: image-object-detection
- **Downloads**: 3
- **Stars**: 1
- **Last updated**: 2026-01-28

Source: https://www.modelscope.cn/models/SDT/trademark_detect

---

这里展示了一个代码片段，展示了如何使用商标检测模型：
from ultralytics import YOLO
import os
from pathlib import Path

# 1. 加载训练好的模型
model = YOLO('goods_detect.pt')

# 2. 设置输入和输出文件夹路径
input_folder = 'photo'
output_folder = 'results_goods'

# 创建输出目录
Path(output_folder).mkdir(exist_ok=True)

# 3. 支持的图片格式
image_extensions = ('.jpg', '.jpeg', '.png', '.bmp', '.tiff', '.JPG', '.JPEG', '.PNG', '.BMP', '.TIFF')

# 4. 获取所有图片文件
image_files = [f for f in os.listdir(input_folder) if f.lower().endswith(image_extensions)]

# 5. 批量推理并保存结果
for filename in image_files:
    img_path = os.path.join(input_folder, filename)
    results = model(img_path)
    output_path = os.path.join(output_folder, f"result_{filename}")
    results[0].save(filename=output_path)

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

<p style="color: lightgrey;">如果您是本模型的贡献者，我们邀请您根据<a href="https://modelscope.cn/docs/ModelScope%E6%A8%A1%E5%9E%8B%E6%8E%A5%E5%85%A5%E6%B5%81%E7%A8%8B%E6%A6%82%E8%A7%88" style="color: lightgrey; text-decoration: underline;">模型贡献文档</a>，及时完善模型卡片内容。</p>
