用TensorFlow 實現基於 GAN 的極限圖像壓縮框架
本庫是用 TensorFlow 實現的基於 GAN 的極限圖像壓縮框架。該方法由 Agustsson 等人開發,該方法非常有趣,詳細信息請查閱論文:
Generative Adversarial Networks for Extreme Learned Image Compression
https://arxiv.org/abs/1804.02958
Github 鏈接:
https://github.com/Justin-Tan/generative-compression
用法
代碼基於 TensorFlow 1.8
#Clone
$gitclonehttps://github.com/Justin-Tan/generative-compression.git
$cdgenerative-compression
#To train, checkcommandline arguments
$python3 train.py -h
#Run
$python3 train.py -opt momentum --name my_network
訓練的批尺寸(batch size)為 1,每隔一定數量的步驟將重新構造 samples / tensorboard。Checkpoint 每十個 epoches 儲存一次。
圖像壓縮(即將推出)
#Compress
$python3 compress.py -h# check arguments
$python3 compress.py -i /path/to/image -r /path/to/model/checkpoint
結果
這些全局壓縮的圖像來自 CityscapesleftImg8bit數據集的測試分割。
C = 8 channels, multiscale discriminator
Showquantized C=4,8,16channels image comparison
預訓練模型
開發者可以找到用於全局壓縮的預訓練模型,其中 C = 8(對應於 0.072bpp 表示)的通道瓶頸和下的多尺度鑒別器損失。 該模型在Cityscapes(https://www.cityscapes-dataset.com/)leftImg8bit數據集的劃分中了 64 個 epochs 來訓練。
警告:這些模型在 TensorFlow 1.3 下訓練,不過在 TensorFlow 1.8 下似乎也能正常載入。
詳細信息請查看 Github 官方鏈接:
https://github.com/Justin-Tan/generative-compression
從Python入門-如何成為AI工程師
BAT資深演算法工程師獨家研發課程
最貼近生活與工作的好玩實操項目
班級管理助學搭配專業的助教答疑
學以致用拿offer,學完即推薦就業
新人福利
【超過 1000G 神經網路 / AI / 大數據資料】
一場深度學習引發的圖像壓縮革命
※統一高效的機器學習開源庫——Shogun
※用於運行和訓練深度神經網路的開源 C+庫——nGraph
TAG:AI研習社 |