Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Successfully ran test mode in MacOS, where to put Instructions? #52

Closed
mithi opened this issue Jan 20, 2019 · 2 comments
Closed

Successfully ran test mode in MacOS, where to put Instructions? #52

mithi opened this issue Jan 20, 2019 · 2 comments

Comments

@mithi
Copy link

mithi commented Jan 20, 2019

Thank you for making this repo, it's really valuable.

Basically, I tried to use this repo in my Macbook Pro and after a few bumps along the way
I was able to successfully run it! (test mode not training mode)

I tried to run this on MacOS Mojave Version 10.14.2 This is a Mid 2014 Macbook Pro with 2.6 GHz Intel Core i5 Processor and a Memory of 8 GB 1600 MHz DDR3 so it ran extremely slow I had to close all my running apps and wait about 10 - 20 minutes to enhance 4 images. And an hour to enhance my own image.

So my issue is that I think this can help someone, but I don't know where I should put this information.

Should I make a pull request to your Readme or should I just create a Medium article?


Here's what I did:

I know that this project is tested on Ubuntu but I wanted to try my luck anyway.

I created a conda environment (Miniconda) to install dependencies.

Instead of Python 2.7 I used the defaults of Anaconda which is:

Python 3.6.8 |Anaconda, Inc.| (default, Dec 29 2018, 19:04:46)

with TensorFlow version: '1.12.0'

I wont be able to install tensow-gpu IE conda install -c anaconda tensorflow-gpu because I am in OSX

Essentially, this is what I did:

$ conda update conda
$ conda create -n enhance
$ source activate enhance
$ conda install tensorflow
$ conda install -c anaconda pillow
$ conda install nomkl
$ git clone https://github.com/brade31919/SRGAN-tensorflow.git

# Downloaded and pretrained models from Google Drive to root directory
# https://drive.google.com/uc?id=0BxRIhBA0x8lHNDJFVjJEQnZtcmc&export=download
$ tar xvf SRGAN_pre-trained.tar

I tried:

python main.py \
    --output_dir ./result/ \
    --summary_dir ./result/log/ \
    --mode inference \
    --is_training False \
    --task SRGAN \
    --batch_size 1 \
    --input_dir_LR ./data/test_LR/ \
    --input_dir_HR ./data/test_HR/ \
    --num_resblock 16 \
    --checkpoint ./SRGAN_pre-trained/model-200000 \
    --perceptual_mode VGG54 \
--pre_trained_model True

I got:

***
 snip
 snip
***

End of configuration
Finish building the network
2019-01-20 15:01:31.548365: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2019-01-20 15:01:31.551312: I tensorflow/core/common_runtime/process_util.cc:69] Creating new thread pool with default inter op setting: 4. Tune using inter_op_parallelism_threads for best performance.
Loading weights from the pre-trained model
Evaluation starts!!
evaluate image img_001
evaluate image img_003
evaluate image img_002
evaluate image img_005

And the test is successful! Yay!

@brade31919
Copy link
Owner

Hi Mithi,

Thank you for your feedback!
It will be good to have a Medium article, but writing an article may be time consuming.
I think you can update the info in some part of the readme and create the pull request (I will merge the pull request later) and work on the Medium article when you have time.

Best,

@mithi mithi closed this as completed Jan 20, 2019
@mithi
Copy link
Author

mithi commented Jan 20, 2019

Thanks for the response! @brade31919 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants