Try   HackMD

Super Resolution 研究

tags: coding365 機器學習

運行過程

DockerHub 網址

DockerHub for srgan

環境依賴項

  1. 安裝 docker
  2. 下載這個資料夾(其實就是 git clone +訓練素材包,都已經放到對應的位置了+模型)
    https://drive.google.com/drive/folders/1n9sF_s_60GUgbyOzyh630NiAgye9WJVg?usp=sharing

終端任意位置,運行以下指令(這邊路徑以 windows 為例, linux 的記得反斜線,或是直接複製

docker_run_指令

docker run -it --rm -p 8889:8888 -p 6007:6006 -e PASSWORD=JUPYTER_NB_PASSWORD -v C:\Users\willi\Documents\srgan:/srgan william104/srgan /bin/bash

這邊是要自行更改的

-v 代表文件映射,把host 的資料夾映射到 container 內使用,這邊資料夾是可以雙向的更改的。
C:那邊是你存放上述資料夾的位置,:冒號以後是你在 docker 容器內的位置,預設我直接存在根目錄下的 srgan 資料夾。

這邊是其他參數解釋

-p 是 port 映射,前面是本機host,後面是容器container,因為不要打到各位可能已經在運行的程序,我把端口映射 +1

-e 是環境變數設定,其中的一個變數 PASSWORD 是原鏡像(tensorlayer)用來生成 jupyter notebook 密碼用,自行更改,不改沒差。

接著他會自己去 pull images ,run 並開啟 bash,然後下以下指令啟動程序:

cd /srgan python main.py

開始執行這支程式,然後我們繼續來研究ㄅ

運行紀錄

設備紀錄

CPU 紀錄

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

GPU紀錄

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

運行完成

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

討論紀錄

這個東西ㄋ,用到 CNN + GAN,所以ㄋ,你要會現在所以機器學習熱門關鍵字中。幾乎全盤的知識XDD
雖然他說他是 SR"GAN"
但是,他的 GAN 裡面包著 CNN
所以,這個東西訓練要一次訓練兩個神經網路 generator and discriminiator
其中的神經網路是用 CNN 為樣本

然後因為提到 CNN ,所以作者選用 CNN 目前的最佳解之一 VGG來當 model , 這又害我不得不去找 VGG 19是啥
所以才會出現這份筆記 http://gan.seal.moe 裡面的外部資源就是我刷過的文章..

運行結果

LR Original image

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

HR by GAN transfer

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

HR by other transfer

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

HR Original image

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

模型 npz 連結

google drive

遠見與下一步

我想架一個伺服器讓大家傳送圖片進來可以 返回高清圖片

  • 例如 png 才能受到較好的優化(我指的是 jpg 的破壞性壓縮並不能被很好得還原)
  • 優化的圖片不能太大的問題,500800 的可以10s內生出,但是1000700 的卻會直接把16GB內存吃完也生不出來。(i5 8th on mac os CPU mode),
  • 優化算法使應用更廣泛

下個目標就是,低畫質的影片,轉高清

  • 楓 Black, [30.11.18 21:50]
    [In reply to William Mou]
    @WilliamMou 如果每兩幀 只優化一幀 效果上會如何呀 還滿好奇的

  • 老師:IPM 壓縮對於幀數的影響,參考壓縮可還原的部分

  • 楓 Black, [30.11.18 21:50]
    會不會因為視覺暫留 讓使用者感覺不出來

外部資源

SRGAN

srgan paper

srgan GitHub
srgan Data
srgan prepare model

srgan 掘金搜尋

GAN

令人拍案叫绝的Wasserstein GAN

教電腦畫畫:初心者的生成式對抗網路(GAN)入門筆記(TensorFlow + Python3)

CNN

CNN Visual Recognition

VGG model 心得

用PaddlePaddle和Tensorflow实现经典CNN网络Vgg

用tensorflow.slim簡單建立VGG19

Kaggle

分分钟带你杀入Kaggle Top 1%
XGboost

Tensorlayer

Tensorlayer GitHub
Tensorlayer Tutorials

Deep Learning

Deep Learning:中文學習資源整理

Machine learning

CNN visual recognization

Docker

菜鳥教程 Docker

Docker和宿主机之间共享文件

Python

[資料分析&機器學習] 第2.5講:資料視覺化(Matplotlib, Seaborn, Plotly)

Python 的 .py 和 .pyc 檔有什麼不同 ?

pandas提供了一些option设置

額外

check point