EfficientNet 모델 결과를 Inference하는 프로그램입니다. Grad-CAM을 사용하여 시각화한 결과를 확인할 수 있습니다.
Requirements
All the codes are tested in the following environment:
- Windows 10
- GPU: RTX 30xx
- Python 3.7
- torch 1.12.1
- torchvision 0.13.1
CUDA
10~10.2
CUDNN
7.5 (Turing)
CUDA
11.1 ~ 11.4
CUDNN
8.6 (Ampere)
CUDA
11.8 / 12.0~12.3
CUDNN
8.9 (Ada Lovelace)
Install PyTorch for your GPU.
- Only CPU (Conda)
conda install pytorch==1.12.1 torchvision==0.13.1 -c pytorch
- Only CPU (pip)
pip install torch==1.12.1 torchvision==0.13.1
- GPU
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
Install with pip install efficientnet_pytorch
and load a pretrained EfficientNet with:
from efficientnet_pytorch import EfficientNet
model = EfficientNet.from_pretrained('efficientnet-b0')
pip install grad-cam
from pytorch_grad_cam import GradCAM
pip install -r requirements.txt
python main.py