Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

龙图检测"
DragonRecognition

基于YOLOv8目标检测的龙图识别,训练集为600张龙图表情包

检测结果示例

龙图检测" 龙图检测" 龙图检测" 龙图监测"

模型

请前往 Releases 中下载模型。best为较好模型,last为较差模型

使用方法

1.直接使用命令行推理

yolo detect predict model=path/to/best.pt source='https://ultralytics.com/images/bus.jpg'

2.对应python代码示例

from ultralytics import YOLO
from PIL import Image
import cv2

if __name__ == "__main__":
    model = YOLO("runs/detect/train/weights/best.pt")
    results = model.predict("data/train/images/test.png", line_width=10, conf=0.82)
    
    if results[0].boxes.shape[0] > 0:
        print("检测到目标")
        # BGR转RGB
        result_array = results[0].plot()
        result_array_rgb = cv2.cvtColor(result_array, cv2.COLOR_BGR2RGB)
        result_image = Image.fromarray(result_array_rgb)
        result_image.show()
        result_image.save("result.jpg")
    else:
        print("未检测到目标")

About

基于目标检测的龙图识别,龙图检测模型

Topics

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors