Giter Site home page Giter Site logo

level1_imageclassification-cv-12's Introduction

level1imageclassification-cv-12모아이

마스크 착용 상태 분류

- 카메라로 촬영한 사람 얼굴 이미지의 마스크 착용 여부를 판단하는 Task

COVID-19의 확산으로 우리나라는 물론 전 세계 사람들은 경제적, 생산적인 활동에 많은 제약을 가지게 되었습니다. 우리나라는 COVID-19 확산 방지를 위해 사회적 거리 두기를 단계적으로 시행하는 등의 많은 노력을 하고 있습니다.

COVID-19 감염 확산 방지를 위해 무엇보다 중요한 것은 모든 사람이 마스크를 반드시 착용하여 혹시 모를 감염자로부터의 전파 경로를 원천 차단하는 것입니다. 이를 위해 무엇보다도 코와 입을 완전히 가릴 수 있도록 마스크를 올바르게 착용하는 것이 중요하지만 넓은 공공장소에서 모든 사람들의 올바른 마스크 착용 상태를 검사하기 위해서는 추가적인 인적자원이 필요할 것입니다.

따라서, 우리는 카메라로 비춰진 사람 얼굴 이미지 만으로 이 사람이 마스크를 쓰고 있는지, 쓰지 않았는지, 정확히 쓴 것이 맞는지 자동으로 가려낼 수 있는 시스템이 필요합니다. 이 시스템이 공공장소 입구에 갖춰져 있다면 적은 인적자원으로도 충분히 검사가 가능할 것입니다. 🌎

Team Members

강혜지 김용환 박혜나 신중현 이종휘

실험 내용

  • pretrained model : AlexNet / VGGNet / GoogleNet / ResNet / vision transformer
  • Ensemble : Multi Label classification / Multi Model
  • Loss : Label Smoothing / Focal Loss / F1 Loss / Weighted Cross Entropy Loss
  • Data Augmentation : torchvision / Albumentations / CLAHE
  • Hyperparameter : optuna (epoch / learning rate / batch size / optimizer)
  • stratified K-fold cross validation

최종 반영된 내용

  • pretrained model : vision transformer
  • Ensemble : Multi Label classification (그 외 사항은 성능 하락으로 최종 버전에 미반영)

최종 파일

  • train_final / dataset_final / model_final / loss_final / inference_final

Wrap-up Report

https://drive.google.com/file/d/1R3XxrkhqjrIZ_2g5fbKal0MGWWbPAY-e/view?usp=sharing

평가 Metric

  • F1 Score (in "macro" F1, a separate F1 score is calculated for each classes value and then averaged)

Dataset

  • 이미지 수 : 31,500
    • 전체 사람 명 수 : 4,500
    • 한 사람당 사진의 개수: 7 [마스크 착용 5장, 이상하게 착용(코스크, 턱스크) 1장, 미착용 1장]
    • train 60% / test 40% (public 20% + private 20%)
  • 이미지 크기 : (384, 512)
  • 클래스 수 : 마스크 착용여부, 성별, 나이를 기준으로 총 18개의 클래스
    • Mask : Wear / Incorrect / Not Wear
    • Gender : Male / Female
    • Age : <30 / >=30 and <60 / >=60

Input & Output

  • Input
    • 마스크 착용 사진, 미착용 사진, 혹은 이상하게 착용한 사진(코스크, 턱스크)
  • Output
    • 총 18개 클래스에 대해 각 이미지 당 0 ~ 17에 해당되는 예측값을 포함한 csv 파일
    • Ex 7 (the class of cfe1268.jpg), 2 (the class of 3a2662c.jpg), ...

Explanation for codes

  • Dependencies
    • torch==1.7.1
    • torchvision==0.8.2
  • Training
    • SM_CHANNEL_TRAIN={YOUR_TRAIN_IMG_DIR} SM_MODEL_DIR={YOUR_MODEL_SAVING_DIR} python train.py
  • Inference
    • SM_CHANNEL_EVAL={YOUR_EVAL_DIR} SM_CHANNEL_MODEL={YOUR_TRAINED_MODEL_DIR} SM_OUTPUT_DATA_DIR={YOUR_INFERENCE_OUTPUT_DIR} python inference.py
  • Evaluation
    • SM_GROUND_TRUTH_DIR={YOUR_GT_DIR} SM_OUTPUT_DATA_DIR={YOUR_INFERENCE_OUTPUT_DIR} python evaluation.py
  • 최종 파일
    • train_final / dataset_final / model_final / loss_final / inference_final

level1_imageclassification-cv-12's People

Contributors

hyenagatha02 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.