Giter Site home page Giter Site logo

level2-cv-datacentric-cv-05's Introduction

CV 5팀 소개

멤버


양우희

이영진

조민지

조수민

조창희

한상범

진료비 영수증 글자 검출 프로젝트

대회 개요

  • 본 프로젝트는 진료비 영수증의 글자를 검출하는 것을 목표로한다.
  • 영수증의 QR 코드 및 도장, 마스킹 부분은 검출 대상에서 제외된다.
  • 본 대회는 데이터 중심적 사고를 통해 검출 성능을 높이므로 모델 및 손실 함수의의 개선을 지양한다.

팀 역할

이름 역할
전체 EDA, 데이터 클렌징, 팀 분배 및 Wrap up report 작성, 데이터 증강 및 모델 성능 향상을 위한 각종 실험
양우희 생성형 모델을 통한 데이터 증강, 일정 관리, 모델 예측 visualize 코드 작성
이영진 효율적인 실험을 위한 Config 코드 작성, argparser 작성, 데이터 전처리 및 증강 실험
조민지 DetEval을 활용한 metric 측정 코드 작성, 모델 예측 분석 기반 edge case 파악, Blur augmentation 실험
조수민 검증 셋 구축, 데이터 전처리 및 증강 실험, 모델 예측 logging 코드 작성, wbf 앙상블 실험
조창희 외부 데이터 셋 수집 및 FP16 기능 구현
한상범 GitHub 전략 셋팅, 모델 실험 프로세스 개선, 검증 셋 구축, 데이터 전처리

개발환경

- Language : Python
- Environment
  - CPU : Intel(R) Xeon(R) Gold 5120
  - GPU : Tesla V100-SXM2 32GB × 1
- Framework : PyTorch
- Collaborative Tool : Git, Notion

Dataset

  • 전체 이미지 개수 : 200장 (train 100장, test 100장)
  • 이미지 크기 : 최대 가로크기 4032, 세로크기 4160, 최소 가로크기 645, 세로크기 803
  • Input : 박스 좌표 및 angle, 글자가 포함된 이미지
  • Output : 모델은 bbox 좌표, angle, score 값을 리턴

Data Cleansing

  • 데이터를 직접 관찰하여 라벨링 된 방식에 대해 파악하였다. 데이터 클렌징을 모든 팀원이 나누어 진행을 하였기 때문에, 통합된 규칙이 필요하였다.
  • 논의의 진행 결과로서 일관적인 레이블링이 필요할 것으로 판단되어 각 객체에 대해 약 20px이상 띄워져 있는 경우 다른 객체라 판단하였다.
  • 뿐만 아니라 일정 크기 이하를 가지는 예를들어 쉼표와 마침표의 경우 학습에 어려움이 있을 것으로 판단되고 평가 진행시에도 큰 점수를 가져가지 않으므로 레이블링에서 제외하였다.
  • 잘못 레이블링 된 경우(배경 레이블링, 박스의 크기를 작게 설정함)도 클렌징 대상에 포함하였다.

Training

python train.py --config "config path"

Inference

python inference.py --model-dir "model path"

📂 File Tree

📦 level2-objectdetection-cv-05
├─ 📂EDA
│  └─ eda.ipynb
├─ 📂config
│  └─ base.yaml
├─ 📂data
│  ├─ dataset.py
│  ├─ east_dataset.py
│  ├─ preprocess.py
│  └─ augmentation.py
├─ 📂model
│  └─ model.py
├─ 📂utils
│  ├─ argparsers.py
│  ├─ create.py
│  ├─ detect.py
│  ├─ deteval.py
│  ├─ logger.py
│  ├─ loss.py
│  ├─ lr_scheduler.py
│  ├─ plot.py
│  └─ util.py
├─ train.py
├─ inference.py
├─ make_train.py
└─ visualize.py

level2-cv-datacentric-cv-05's People

Contributors

jinida avatar cmj5064 avatar github-classroom[bot] avatar sangbeom-hahn avatar hee000 avatar

Stargazers

Woohee Yang avatar

Watchers

Woohee Yang avatar

level2-cv-datacentric-cv-05's Issues

[FEAT] baseline 코드 추가

Background

  • 대회 baseline 코드에 필수 기능들을 추가하였습니다.

To Do

  • split.py로 구한 fold set 활용 가능하도록 수정
  • validation 파트 추가 및 accuracy 계산하는 코드 작성

[FIX] AMP 적용 시 IoU loss에서 nan 발생

Background

  • 빠른 학습을 위해 torch.amp (automatic mixed precision) 적용 시 IoU loss가 nan이 되는 문제
  • torch.autograd.set_detect_anomaly(True)으로 float32 -> float16 연산 중 언더/오버 플로우 지점을 분석
  • EASTLoss 연산 과정 중 get_geo_loss의 area_intersect에서 언더플로우, area_union에서 오버플로우 발생
  • (area_intersect + 1.0) / (area_union + 1.0)가 0으로 수렴하며 -torch.log가 inf로 발산

To Do

  • AMP 적용
  • iou_loss_map이 발산하지 않도록 수정

[FEAT] 라이브러리를 이용한 transform 적용을 위한 코드 변경

Background

  • 다양한 albumentation transform 적용 실험을 위해 dataset transform 부분을 수정합니다.

To Do

  • dataset.py : transform 옵션 수정
  • dataset_all.py : transform 옵션과 전체 데이터셋 학습용 파일
  • train.py -> train_all.py : 전체 데이터셋 학습용 파일
  • config 파일을 이용한 transform 관리

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.