Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@
/loggerJK/VOCtest*
/loggerJK/wandb
*.bin
.ipynb_checkpoints
.ipynb_checkpoints
**/__pycache__/*
__pycache__
VOCdevkit
VOCtrainval_06*
.DS_Store
wandb
39 changes: 25 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,39 @@
- Training 과정의 디테일에 집중했습니다.
- 고연전 오대빵을 기원합니다.

# 설명
- 제 작업물은 `./loggerJK` 폴더 안에 있습니다.
# loggerJK
## 설명

```bash
.
├── Model Test : 모델별로 학습 결과를 보여주는 noteebok이 포함
├── Modules : 모듈식으로 구현한 YOLO V1
├── datasets : VOCDetection Dataset
└── notebooks : Jupyter Notebook으로 구현한 YOLO V1
```


- `loggerJK/Modules`
- 사용법
- `python main.py --cfg config.yaml`
- 세부 설정사항은 config.yaml 값의 수정을 통해 가능합니다.
- ex) `config.TRAINING.DEVICE = cuda:0` : GPU를 이용해 학습하는 옵션
- `loggerJK/notebooks`
- `YOLO_singleLoss.ipynb`
- 배치 단위 처리를 지원하지 않는 버전의 YOLO입니다.
- `YOLO_batchLoss.ipynb`
- 배치 단위 처리를 지원하도록 개선한 버전의 YOLO입니다.
- `YOLO_batchLoss_trainval.ipynb`
- Training Set만으로는 학습이 어려워 Training / Validation Set 모두 학습에 이용한 노트북입니다.
- 학습한 모델의 Inference 결과물은 `./loggerJK/Model Test` 폴더 안에 있습니다.
- `./loggerJK/Model Test/model_test.ipynb`
- 학습한 모델의 Inference 결과물은 `loggerJK/Model Test` 폴더 안에 있습니다.
- `loggerJK/Model Test/model_test.ipynb`
- Inference 과정 중 mAP 계산, Non-Maximum Suppression과 같은 부분들은 구현되어 있지 않았습니다.

# 모델 설명
- Base Model : Vision Transformer
- `vit_base_patch32_384` from `timm`
## 모델 설명
- Base Model (from `timm`)
- `vit_base_patch32_384`
- `swin_base_patch4_window12_384_in22k`
- `input_size` : $384 \times 384$
- `learning_rate` : 1e-5 (fixed)
- `epoch` : 70
- 이 외의 기타 Training에 관련된 수학적 디테일들은 논문과 동일하거나, 최대한 유사하도록 구현했습니다.


@misc{pascal-voc-2007,
author = "Everingham, M. and Van~Gool, L. and Williams, C. K. I. and Winn, J. and Zisserman, A.",
title = "The {PASCAL} {V}isual {O}bject {C}lasses {C}hallenge 2007 {(VOC2007)} {R}esults",
howpublished = "http://www.pascal-network.org/challenges/VOC/voc2007/workshop/index.html"}
- 이 외의 기타 Training에 관련된 수학적 디테일들은 논문과 동일하거나, 최대한 유사하도록 구현했습니다.
2 changes: 1 addition & 1 deletion What I Learned.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
- ```loss = torch.sum(torch.cat(loss_list))``` torch.cat을 써야 오류가 안난다
- opencv의 `im.read()`로 불러들인 이미지는 numpy array로 저장된다.
- Loss는 CPU에서 계산하는 것이 훨씬 이득이다. 특히 이렇게 for문으로 돌리는 경우라면!
- ` x = x + y` is not inplace. `x += y`is inplace.` PyTorch에서 inplace 연산은 되도록 피해야 한다.
- `x += y`is inplace. ` x = x + y` is not inplace. PyTorch에서 inplace 연산은 되도록 피해야 한다.
- `torch.Tensor`는 기본적으로 immutable. 일반적인 경우, 텐서 간의 복사는 복사된 참조 변수의 수정이 기존 참조 변수의 값에 똑같은 영향을 미친다
- [Tensor element를 mutable하게 복사하기](https://froggydisk.github.io/fourth-post/)
Binary file removed loggerJK/.DS_Store
Binary file not shown.
Binary file removed loggerJK/Model Test/.DS_Store
Binary file not shown.
Loading