서민정

feat: 폴더구조 변경

1 +
2 +# Feature SR
3 +
4 +1. train
5 +
6 +`!python main.py --dataRoot /content/drive/MyDrive/feature/HR_trainset/features --scaleFactor 4 --featureType p6 --batchSize 16 --cuda --nEpochs 20`
7 +
8 +2. inference
9 +
10 +`!python inference.py --cuda --model "model.pth" --dataset "/content/drive/MyDrive/feature/features/LR_2" --featureType "p3" --scaleFactor 4`
11 +
12 +3. calculate mAP
13 +
14 +```
15 +# [1]
16 +# install dependencies:
17 +!pip install pyyaml==5.1
18 +import torch, torchvision
19 +print(torch.__version__, torch.cuda.is_available())
20 +!gcc --version
21 +# opencv is pre-installed on colab
22 +
23 +# [2]
24 +# install detectron2: (Colab has CUDA 10.1 + torch 1.8)
25 +# See https://detectron2.readthedocs.io/tutorials/install.html for instructions
26 +import torch
27 +assert torch.__version__.startswith("1.8") # need to manually install torch 1.8 if Colab changes its default version
28 +!pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.8/index.html
29 +# exit(0) # After installation, you need to "restart runtime" in Colab. This line can also restart runtime
30 +
31 +# [3]
32 +# Some basic setup:
33 +# Setup detectron2 logger
34 +import detectron2
35 +from detectron2.utils.logger import setup_logger
36 +setup_logger()
37 +
38 +!python calculate_mAP.py --valid_data_path /content/drive/MyDrive/dataset/validset_100/ --model_name VDSR --loss_type MSE --batch_size 16
39 +```
40 +
41 +## colab 링크
1 > ipynb 파일이 khuhub에서 제대로 보이지 않아 적어두는 colab link 42 > ipynb 파일이 khuhub에서 제대로 보이지 않아 적어두는 colab link
2 43
3 ## Colab link 44 ## Colab link
......
1 -## colab 링크
2 -- [x4 피쳐 추출]()
3 -- [x3 피쳐 추출]()
4 -- [최종 mAP 계산]()
5 -
6 -# Feature SR
7 -
8 -1. train
9 -
10 -`!python main.py --dataRoot /content/drive/MyDrive/feature/HR_trainset/features --scaleFactor 4 --featureType p6 --batchSize 16 --cuda --nEpochs 20`
11 -
12 -2. inference
13 -
14 -`!python inference.py --cuda --model "model.pth" --dataset "/content/drive/MyDrive/feature/features/LR_2" --featureType "p3" --scaleFactor 4`
15 -
16 -3. calculate mAP
17 -
18 -```
19 -# [1]
20 -# install dependencies:
21 -!pip install pyyaml==5.1
22 -import torch, torchvision
23 -print(torch.__version__, torch.cuda.is_available())
24 -!gcc --version
25 -# opencv is pre-installed on colab
26 -
27 -# [2]
28 -# install detectron2: (Colab has CUDA 10.1 + torch 1.8)
29 -# See https://detectron2.readthedocs.io/tutorials/install.html for instructions
30 -import torch
31 -assert torch.__version__.startswith("1.8") # need to manually install torch 1.8 if Colab changes its default version
32 -!pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.8/index.html
33 -# exit(0) # After installation, you need to "restart runtime" in Colab. This line can also restart runtime
34 -
35 -# [3]
36 -# Some basic setup:
37 -# Setup detectron2 logger
38 -import detectron2
39 -from detectron2.utils.logger import setup_logger
40 -setup_logger()
41 -
42 -!python calculate_mAP.py --valid_data_path /content/drive/MyDrive/dataset/validset_100/ --model_name VDSR --loss_type MSE --batch_size 16
43 -```
...\ No newline at end of file ...\ No newline at end of file