Giter Site home page Giter Site logo

level1-imageclassification-cv-10's People

Stargazers

 avatar

Watchers

 avatar

level1-imageclassification-cv-10's Issues

[FIX] Need to check F1Loss

Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/optuna/study/_optimize.py", line 200, in _run_trial
value_or_values = func(trial)
File "/data/ephemeral/home/level1-imageclassification-cv-10/utils/hpo.py", line 136, in objective
metrics = train(model, epochs, criterion, optimizer, scheduler)
File "/data/ephemeral/home/level1-imageclassification-cv-10/utils/hpo.py", line 41, in train
loss = criterion(outputs, labels)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "/data/ephemeral/home/level1-imageclassification-cv-10/utils/loss.py", line 47, in forward
assert y_pred.ndim == 1
AssertionError

위와 같은 에러가 발생합니다. F1Loss를 수정해야할 것 같습니다.

[FEAT] 다양한 efficientNet backbone 실험

Background

  • time 라이브러리 내의 추가적인 pre-trained model들 중 efficientNet 관련 모델들을 추가적으로 실험해봅니다.

Model List

  • efficientnet_el
  • efficientnet_el_pruned
  • efficientnet_em
  • efficientnet_es
  • efficientnet_es_pruned
  • efficientnet_lite0
  • efficientnetv2_rw_m
  • efficientnetv2_rw_s
  • efficientnetv2_rw_t

Expectation

  • 남는 시간에 성능이 좋은 다른 backbone을 찾을 수 있을 것 같습니다.

plot.py 상대경로 문제

plot.py에서 data/dataset import 시 상대경로 문제로 참조하지 못하는 문제가 있습니다.

[FEAT] multi-head 모델 hidden layer 변경 실험

Background

현재 multi-head 모델은 fc layer가 마스크 여부, 성별, 나이가 모두 동일하게
1792 -> 512 -> num_class 순으로 되어 있습니다.
이 부분에서 layer를 더 쌓을지, feature 개수를 다양하게 바꿀지 실험을 해봐야 할 것 같습니다.

큰 차이는 없지만 성별의 경우 클래스 개수도 다르니 나머지 둘과 파라미터 개수를 다르게 해보려고 합니다.

Expectation

  • 성능이 더 좋은 hidden features 개수 찾기

[FEAT] yolo, rembg 관련 기능 추가 및 실험

yolo, rembg를 미리 전처리하여 데이터 파일을 생성 후 훈련하는 방식으로 구현중

이에 따라 현재 구현된 데이터셋이 호출 되면서 detection하는 부분을 삭제할지 고민 중

detection을 통한 성능 향상이 얼마나 일어날지, 또 각각의 클래스에 대한 분류에 대해 어떤 detection이 어떤 성능을 보이는지 실험 예정

[FIX] DataLoader_num_workers : RuntimeError

train_loader = DataLoader(
            train_set,
            batch_size=args.batch_size,
            num_workers=multiprocessing.cpu_count() // 2,
            shuffle=True,
            pin_memory=use_cuda,
            drop_last=True,
        )

Detection model 적용시 해당 data loader 코드에서 다음과 같은 오류 발생
RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method

num_workers=multiprocessing.cpu_count() // 2
num_workers=multiprocessing.cpu_count()//2 if args.face_detection=='False' else 0 로 변경하면 에러는 사라지지만
정확한 원인을 찾아야 함

[FEAT] Hyper Parameter Optimization 구현

HPO 기능 구현

  1. 모델을 고정하고 search space 내 lr, epoch, loss, optimizer, scheduler 찾는 코드
  2. 여러가지 모델 추가
  3. 다양한 Augmentation 중 학습시 중요한 combination 찾는 코드

[REFACT] datasets 내부에 있는 augmentation code 관련된 코드 분리

  • datasets.py 에 있는 BaseAugmentation, AddGaussianNoise, CustomAugmentation 와 같은 augmentation과 관련된 코드를 같은 data 폴더 내 augmentation.py 으로 옮겼습니다.
  • train.py 코드내 transform을 가져오는 부분인 transform_module = getattr(import_module("data.augmentation"), args.augmentation) 을 변경했습니다.

[FEAT] Loss(Cross Entropy, Focal Loss) 실험

Cross Entropy, Focal Loss 각 손실 함수에 대해 평가한다.
현재 Gender, Mask, Age 각 분류 모델을 나눠 학습을 진행하므로
그에대해 알맞는 손실 함수를 선택한다.

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.