Giter Site home page Giter Site logo

mask_wearing_detection_based_on_ultralytics's Introduction

Mask Wearing Detection Based on Ultralytics

项目名称

Mask_Wearing_Detection_Based_on_Ultralytics

项目简介

A project of mask-wearing detection based on Ultralytics.

基于 Ultralytics 的口罩佩戴检测项目。

Relevant project

  • 同济大学2023年大学生创新创业训练计划项目

Research Background

Since the COVID-19 pandemic, correctly and properly wearing masks has been a primary and effective method to block the transmission of the virus. This project is based on the YOLOv8 object detection algorithm to establish an access control system for detecting mask wearing and its compliance, helping to monitor mask wearing and its appropriateness, thus aiding in response to potential future pandemic situations.

Research Process

Through the initial phase of reading papers and researching materials, the project members gained a preliminary understanding of the YOLO model principles; in the second phase, the team constructed the project model and selected some open-source datasets for initial training, successfully completing a binary classification for mask wearing detection; in the third phase, the team attempted to expand the dataset by adding images of improperly worn masks and conducted manual labeling, while also adjusting model parameters to make the prediction results more accurate; finally, in the fourth phase, the team evaluated the experimental data and summarized the project findings.

Research Outcomes

The team, based on the currently mature object detection model (YOLOv8), designed an access control detection system for mask wearing with high accuracy and real-time capabilities, suitable for real-time mask wearing detection applications.

By using our own optimized training dataset, which includes images of mask wearing in various scenarios, we achieved the access control detection system's functionality to detect whether a mask is worn and whether it is worn correctly. Innovative designs were implemented regarding the standard of mask wearing, and combined with the detection results, commands on whether to grant access are issued.

This project can be applied to campuses, stations, and other scenarios with high foot traffic and complex environments, aimed at reducing labor costs and aiding in pandemic prevention.

研究背景

自新冠肺炎疫情后,正确规范佩戴口罩是阻断疫情传播的主要途径和有效方法。本项目基于 YOLOv8 目标检测算法来建立门禁检测口罩佩戴系统,帮助检测口罩佩戴及佩戴是否规范,有助于应对未来可能的疫情情况。

研究过程

通过第一阶段的论文阅读和资料查询,项目成员初步掌握了 YOLO 模型相关原理;在第二阶段项目成员搭建了项目模型并选取一些开源数据集进行初步训练,成功完成是否佩戴口罩的二分类;在第三阶段项目成员在第三阶段尝试增添数据集,补充未规范佩戴口罩的图片集并进行了手动标注,同时调整了模型参数使得预测结果更加精确;最后在第四阶段小组对实验数据进行评估以及对项目进行总结。

研究成果

团队基于当前比较成熟的目标检测模型(YOLOv8),设计了一套门禁检测口罩佩戴系统,具有较高的准确性和实时性,适合于实时口罩佩戴检测应用。

我们通过使用自己搭建的优化过的训练数据集,包含各种场景下的口罩佩戴图像,实现了门禁检测口罩佩戴系统对是否佩戴口罩、是否佩戴完好的检测功能,并针对口罩佩戴的规范性进行了创新性设计,并结合检测结果,给出是否放行的指令。

该项目能应用于校园、车站等人流量大、环境复杂的情形,旨在降低人力成本,有助于防范疫情。

项目组成

模型训练与检测代码

  • 模型训练代码

    from ultralytics import YOLO
    
    model = YOLO('yolov8n.pt')
    model.train(data='Dataset/data.yaml', workers=0, epochs=100, batch=16)
  • 模型检测代码

    from ultralytics import YOLO
    
    yolo = YOLO('Train/weights/best.pt', 'detect')
    result = yolo(source=0, show=True)

文档更新日期

2024年4月24日

mask_wearing_detection_based_on_ultralytics's People

Contributors

minmuslin avatar

Stargazers

bunnyoii avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.