GithubHelp home page GithubHelp logo

twhui / srgan-pytorch Goto Github PK

View Code? Open in Web Editor NEW
57.0 3.0 8.0 12.45 MB

An Unofficial PyTorch Implementation for Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network

Python 100.00%
srgan srresnet cnn super-resolution pytorch

srgan-pytorch's People

Contributors

twhui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

srgan-pytorch's Issues

about SGRAN test mode

Hello twhui,

I would like to perform a test phase on the SGRAN.
I downloaded the SGRAN pretrained model at your link : https://drive.google.com/file/d/1vAtPLGbdyt--SZQxUl0YKPRQgu6-kR6v/view, and set il all up on my local env.
While reading the README, i was sure that the bench support testing for SGRAN
but when I inspect the sources, my understanding is that "test mode" is only available
for SRResNet.

In model.py below, It is clear that sr_gan is only loaded for "training mode" , isn't it :

def create_model(opt): 
    if opt.model == 'sr_resnet': 
        from .sr_resnet_model import SRResNetModel 
        model = SRResNetModel() 
    elif opt.model == 'sr_resnet_test': 
        from .sr_resnet_test_model import SRResNetTestModel 
        model = SRResNetTestModel() 
 
    elif opt.model == 'sr_gan': 
        from .sr_gan_model import SRGANModel 
        model = SRGANModel() 
 
    else: 
        raise NotImplementedError('Model [%s] not recognized.' % opt.model) 
    model.initialize(opt) 
    print('Model [%s] is created.' % model.name()) 
    return model 

In addition, when I execute the cmd below, I got a crash that tells me again that test mode is not supported got SRGAN :

CUDA_VISIBLE_DEVICES=0 python ./test.py --option ./options/test/SRGAN_x4.json

Traceback (most recent call last):
  File "./test.py", line 45, in <module>
    model = create_model(opt)
  File "/home/dgerin/SRGAN-PyTorch/models/models.py", line 17, in create_model
    model.initialize(opt)
  File "/home/dgerin/SRGAN-PyTorch/models/sr_gan_model.py", line 20, in initialize
    assert opt.is_train

Could you give more information about that ?

Thanks,
Dimitri

about training details

Hello twhui,
I would like to train my SRGAN using your code. And the pretrained model you provided have a great performance during testing, so can you tell me the batchsize , epochs, traing time and machine configuration of your pretrained model, thank you very much.

little typo in code

Hi,
I guess there may be some problem with the comment in this line.
If the input range is [-1, 1], the mean will be:

# [2*0.485-1, 2*0.456-1, 2*0.406-1] 

rather than:

# [0.485-1, 0.456-1, 0.406-1] 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.