python 图像分析自然纹理方向与粗细代码_通过深度空间特征变换恢复图像超分辨率的真实纹理(CVPR 2018)...

😃 Training codes are in BasicSR repo.

Recovering Realistic Texture in Image Super-resolution by Deep Spatial Feature Transform

This repo only provides simple testing codes - original torch version used in the paper and a pytorch version. For full training and testing codes, please refer to BasicSR.

BibTeX

@InProceedings{wang2018sftgan,

author = {Wang, Xintao and Yu, Ke and Dong, Chao and Loy, Chen Change},

title = {Recovering realistic texture in image super-resolution by deep spatial feature transform},

booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},

month = {June},

year = {2018}

}

Table of Contents

Quick Test

It provides Torch and PyTorch versions. Recommend the PyTorch version.

PyTorch Dependencies

Python 3

Python packages: pip install numpy opencv-python

[OR] Torch Dependencies

Other torch dependencies, e.g. nngraph, paths, image (install them by luarocks install xxx)

Test models

Note that the SFTGAN model is limited to some outdoor scenes. It is an unsatisfying limitation that we need to relax in future.

Clone this github repo.

git clone https://github.com/xinntao/SFTGAN

cd SFTGAN

There are two sample images in the ./data/samples folder.

Download pretrained models from Google Drive or Baidu Drive. Please see model list for more details.

First run segmentation test.

[PyTorch]

cd pytorch_test

python test_segmentation.py

[Torch]

cd torch_test

th test_segmentation.lua

The segmentation results are then in ./data with _segprob, _colorimg, _byteimg suffix.

Run sftgan test.

[PyTorch]

python test_sftgan.py.

[Torch]

th test_sftgan.lua

The results are in then in ./data with _result suffix.

Spatial Feature Modulation

SFT - Spatial Feature Transform (Modulation).

A Spatial Feature Transform (SFT) layer has been proposed to efficiently incorporate the categorical conditions into a CNN network.

There is a fantastic blog explaining the widely-used feature modulation operation distill - Feature-wise transformations.

Semantic Categorical Prior

We have explored the use of semantic segmentation maps as categorical prior for SR.

OST dataset

Outdoor Scene Train/Test

OST (Outdoor Scenes),OST Training,7 categories images with rich textures

OST300 300 test images of outdoor scences

Download the OST dataset from Google Drive or Baidu Drive.

😆 Image Viewer - HandyViewer

May try HandyViewer - an image viewer that you can switch image with a fixed zoom ratio, easy for comparing image details.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值