코드민수
[ISR] Image Super-Resolution 환경 설정 본문
BIG
https://github.com/idealo/image-super-resolution
GitHub - idealo/image-super-resolution: 🔎 Super-scale your images and run experiments with Residual Dense and Adversarial Net
🔎 Super-scale your images and run experiments with Residual Dense and Adversarial Networks. - GitHub - idealo/image-super-resolution: 🔎 Super-scale your images and run experiments with Residual Den...
github.com
이미지의 해상도를 높여주는(초해상화) 딥러닝 알고리즘을 쉽게 사용할 수 있는 레퍼지토리입니다.
RDN과 RRDN 모델을 제공하고 있고, x2와 x4 pre-trained 모델이 있습니다.
깃에 나와있는대로 설치하면 tensorflow==2.0, h5py==2.10.0이 설치되는데,
CUDA 11.2, cuDNN 8.2 기준으로 GPU 사용이 되지 않아서 방법을 찾아 공유합니다.
※ 가상환경을 만들어서 세팅하는 것을 권장합니다.
1. ISR 설치
git clone https://github.com/idealo/image-super-resolution
cd image-super-resolution
python setup.py install
지정한 경로에 clone 후 setup.py 실행
2. tensorflow, h5py 버전 변경
pip install tensorflow==2.6.2
pip install tensorflow-gpu==2.6.2
pip install h5py==3.1.0
23년 4월 30일 기준 pip 설치 default 버전
3. 실행
import numpy as np
from PIL import Image
img = Image.open('data/input/test_images/sample_image.jpg')
lr_img = np.array(img)
from ISR.models import RDN
rdn = RDN(weights='psnr-small')
sr_img = rdn.predict(lr_img)
Image.fromarray(sr_img)
자세한 알고리즘 및 Train & Prediction 방법은 다음 기회에..
LIST
'[Python] > 환경설정' 카테고리의 다른 글
[Docker] opencv 에러 ImportError: libGL.so.1 (0) | 2023.08.08 |
---|---|
[anaconda3] 아나콘다 가상환경 생성, 삭제, 복사 (0) | 2023.04.11 |
Windows10 Detectron2 설치 방법 (0) | 2023.03.28 |