An open API service indexing awesome lists of open source software.

https://github.com/dongryeollee1/mask-detection

mask detection project through object detection to experience various model
https://github.com/dongryeollee1/mask-detection

Last synced: 3 months ago
JSON representation

mask detection project through object detection to experience various model

Awesome Lists containing this project

README

        

# Mask Detection

## YOLOv7

[YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors](https://arxiv.org/abs/2207.02696)

## Requirements

- [LINK](https://github.com/WongKinYiu/yolov7/blob/main/requirements.txt)

```python
!pip install -r requirements.txt
```

## Weight

![weight](./image/weight_pic.PNG)

- `YOLOv7-X` ์‚ฌ์šฉ

## Data

- ๐Ÿ˜ท[Kaggle_mask_detection](https://www.kaggle.com/datasets/andrewmvd/face-mask-detection) ์‚ฌ์šฉ

### Data tree

```python
root
โ”œโ”€โ”€annotations (folder)
โ”œ โ”œโ”€โ”€ maksssksksss0.xml
โ”œ โ”œโ”€โ”€ maksssksksss1.xml
โ”œ โ”œโ”€โ”€ maksssksksssn.xml
โ”œโ”€โ”€images (folder)
โ”œ โ”œโ”€โ”€ maksssksksss0.png
โ”œ โ”œโ”€โ”€ maksssksksss1.png
โ”œ โ”œโ”€โ”€ maksssksksssn.png
โ””โ”€โ”€dd.yaml
```

### Preprocessing

> For now, preprocessed as [ROBOFLOW](https://roboflow.com/)

> [`xml to txt`](https://github.com/Isabek/XmlToTxt)์„ ์‚ฌ์šฉํ•œ ์ „์ฒ˜๋ฆฌ ์ถ”๊ฐ€ ์˜ˆ์ •

### Expected data tree when preprocessing

```python
root
โ”œโ”€โ”€train
โ”œ โ”œโ”€โ”€images
โ”œ โ”œ โ”œโ”€โ”€images01.png
โ”œ โ”œโ”€โ”€label
โ”œ โ”œ โ”œโ”€โ”€images01.txt
โ”œโ”€โ”€test
โ”œ โ”œโ”€โ”€images
โ”œ โ”œ โ”œโ”€โ”€images01.png
โ”œ โ”œโ”€โ”€label
โ”œ โ”œ โ”œโ”€โ”€images01.txt
โ”œโ”€โ”€valid
โ”œ โ”œโ”€โ”€images
โ”œ โ”œ โ”œโ”€โ”€images01.png
โ”œ โ”œโ”€โ”€label
โ”œ โ”œ โ”œโ”€โ”€images01.txt
โ”œโ”€โ”€data.yaml
```

## Performance

### Training

![train_result](./train/results.png)

![train_pred](./train/test_batch1_pred.jpg)

### Test

![test_result](./test/confusion_matrix.png)

### Inference

![inference_result](./inference/12.png)

![inference_video mp4_000000680](https://user-images.githubusercontent.com/82855597/180775979-f06621f7-26e4-4816-bd36-b687f55fafab.gif)