Git Product home page Git Product logo

srgan's Introduction

Hi there 👋

My name is Namjoo Kim, and I am the CEO of QUARKONIX PTE.,LTD. in Singapore.

  • 😄 I was the leader of Klaybay CIC at Krust in Seoul, Korea.
  • 🔭 I was the former CTO of Kakao brain.
  • 🌱 I was currently learning Javascript, python, Solidity language.
  • 💙 I love collaborating with developers, engineers and researchers.
  • 😄 My current interest is Blockchain and Machine learning.

Namju's GitHub stats

srgan's People

Contributors

buriburisuri 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

srgan's Issues

Why my SR images are black,when I trained cifar10 dataset?

I trained this SRGAN project with the cifar10 dataset。I only changed the input set and generation network‘s to :
with tf.sg_context(name='generator', act='relu', bn=True):
gen = (x_small
.sg_conv(dim=32)
.sg_conv()
.sg_conv(dim=12, act='sigmoid', bn=False)
.sg_periodic_shuffle(factor=2))
but the result is bad,the SR images are black。 and I find that the loss is always rising。I have no idea about this。Do you have meet this situation? @buriburisuri

Error while run generate.py

Traceback (most recent call last):
File "generate.py", line 60, in
saver.restore(sess, tf.train.latest_checkpoint('asset/train/ckpt'))
File "/home/shuai/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1428, in restore
{self.saver_def.filename_tensor_name: save_path})
File "/home/shuai/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 767, in run
run_metadata_ptr)
File "/home/shuai/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 965, in _run
feed_dict_string, options, run_metadata)
File "/home/shuai/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1015, in _do_run
target_list, options, run_metadata)
File "/home/shuai/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1035, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InternalError: Unable to get element from the feed as bytes.

test time is too high

When testing, if I change the size of the input image, the test time on the GPU will be very long, without changing the size of the image, the second start time will be normal; this problem was not found on the CPU; is this a problem for tensorflow?

changing factor in .sg_periodic_shuffle causes crash

.../sg_transform.py", line 603, in sg_periodic_shuffle
    channel_factor = channel // channel_target
ZeroDivisionError: integer division or modulo by zero

Get an error when changing factor=2 to factor=4:

with tf.sg_context(name='generator', act='relu', bn=True):
    gen = (x_small
           .sg_conv(dim=32)
           .sg_conv()
           .sg_conv(dim=4, act='sigmoid', bn=False)
           .sg_periodic_shuffle(factor=2))

Any thoughts?

I can't be able to restore the saved net

runfile('D:/SRGAN-master/generate.py', wdir='D:/SRGAN-master')
Extracting ./asset/data/mnist\train-images-idx3-ubyte.gz
Extracting ./asset/data/mnist\train-labels-idx1-ubyte.gz
Extracting ./asset/data/mnist\t10k-images-idx3-ubyte.gz
Extracting ./asset/data/mnist\t10k-labels-idx1-ubyte.gz
Traceback (most recent call last):

File "", line 1, in
runfile('D:/SRGAN-master/generate.py', wdir='D:/SRGAN-master')

File "C:\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
execfile(filename, namespace)

File "C:\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "D:/SRGAN-master/generate.py", line 60, in
saver.restore(sess, tf.train.latest_checkpoint('asset/train/ckpt'))

File "C:\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 1388, in restore
{self.saver_def.filename_tensor_name: save_path})

File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 766, in run
run_metadata_ptr)

File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 964, in _run
feed_dict_string, options, run_metadata)

File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1014, in _do_run
target_list, options, run_metadata)

File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1021, in _do_call
return fn(*args)

File "C:\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1003, in _run_fn
status, run_metadata)

SystemError: returned a result with an error set

pip install picamera error

Hello please help me in insytalling picamera in windows
i tried with pip install picamera but unable to do please help me

Results donot match

Hi,

I implemented SRGAN as-is with one change that was just to change the concat function arguments order.
I am not able to re-generate the same results. Infact, I am totally getting black images as output of SRGAN when I run generate.py

The discriminator and generator losses start from negative 100's and one every epoch they get multiplied by 10 and hence the losses tend to go to negative infinity, I guess..

If anyone can help, thanks.

IOError: Not a gzipped file

I'm trying to run the code on Colab and receiving this error message:

`Extracting ./asset/data/mnist/train-images-idx3-ubyte.gz
Traceback (most recent call last):
File "train.py", line 23, in
data = tf.sg_data.Mnist(batch_size=batch_size)
File "/usr/local/lib/python2.7/dist-packages/sugartensor/sg_data.py", line 29, in init
data_set = input_data.read_data_sets(Mnist._data_dir, reshape=reshape, one_hot=one_hot)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py", line 213, in read_data_sets
train_images = extract_images(f)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py", line 53, in extract_images
magic = _read32(bytestream)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py", line 35, in _read32
return numpy.frombuffer(bytestream.read(4), dtype=dt)[0]
File "/usr/lib/python2.7/gzip.py", line 267, in read
self._read(readsize)
File "/usr/lib/python2.7/gzip.py", line 302, in _read
self._read_gzip_header()
File "/usr/lib/python2.7/gzip.py", line 196, in _read_gzip_header
raise IOError, 'Not a gzipped file'

IOError: Not a gzipped file`

I think this error is due to Tensorflow version incompatibility. I am using Sugartensor version ==0.0.1.7 and tensorflow version == 0.12.0rc0. Note that the recommended tensorflow version is rc0.11 which is not available via pip . How can I get tensorflow==rc0.11 version ? Thanks in advance.

Unable to get element from the feed as bytes

When I run your code generate.py, errors as follow:

Traceback (most recent call last): File "generate.py", line 60, in <module> saver.restore(sess, tf.train.latest_checkpoint('asset/train/ckpt')) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1388, in restore {self.saver_def.filename_tensor_name: save_path}) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 766, in run run_metadata_ptr) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 964, in _run feed_dict_string, options, run_metadata) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1014, in _do_run target_list, options, run_metadata) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1034, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InternalError: Unable to get element from the feed as bytes.

I've found similar errors when using tensorflow.
http://stackoverflow.com/questions/41369062/tensorflow-fail-with-unable-to-get-element-from-the-feed-as-bytes-when-attemp
But still don't know how to solve it...

A error while training

Hi! I installed a python, then installed recent versions of sugartensor and tensorflow using

pip install tensorflow
pip install sugartensor.

While trying to run "train.py" file it gives me this traceback:

Python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 16:02:32) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.

===================== RESTART: E:\SRGAN-master\train.py =====================
Successfully downloaded train-images-idx3-ubyte.gz 9912422 bytes.
Extracting ./asset/data/mnist\train-images-idx3-ubyte.gz
Successfully downloaded train-labels-idx1-ubyte.gz 28881 bytes.
Extracting ./asset/data/mnist\train-labels-idx1-ubyte.gz
Successfully downloaded t10k-images-idx3-ubyte.gz 1648877 bytes.
Extracting ./asset/data/mnist\t10k-images-idx3-ubyte.gz
Successfully downloaded t10k-labels-idx1-ubyte.gz 4542 bytes.
Extracting ./asset/data/mnist\t10k-labels-idx1-ubyte.gz
Traceback (most recent call last):
File "E:\SRGAN-master\train.py", line 36, in
y_disc = tf.concat(0, [y, y * 0])
File "D:\Python35\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1047, in concat
dtype=dtypes.int32).get_shape(
File "D:\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 651, in convert_to_tensor
as_ref=False)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 716, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\constant_op.py", line 176, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\constant_op.py", line 165, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "D:\Python35\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 367, in make_tensor_proto
_AssertCompatible(values, dtype)
File "D:\Python35\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 302, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

'module' object has no attribute 'global_variables'

I am using the latest version of tensorflow with python 2.7 and has installed sugartensor and matplotlib as required. However, when I execute 'python train.py' in anaconda tensorflow environment, it still goes wrong. How could I deal with it?
Plus, I do not really understand the words 'You can see the result ckpt files and log files in the 'asset/train' directory. Launch tensorboard --logdir asset/train/log to monitor training process.' Does it mean I have to execute 'python train.py' and wait until the work done, then excute 'tensorboard --logdir asset/train/log'? By navigating to http://127.0.1.1:6006, I just see an almost blank TensorBoard webpage and have no idea what to do.
Many thanks.

Extracting ./asset/data/mnist/train-images-idx3-ubyte.gz
Extracting ./asset/data/mnist/train-labels-idx1-ubyte.gz
Extracting ./asset/data/mnist/t10k-images-idx3-ubyte.gz
Extracting ./asset/data/mnist/t10k-labels-idx1-ubyte.gz
Traceback (most recent call last):
  File "train.py", line 48, in <module>
    .sg_conv(dim=32)
  File "/home/haiyang/anaconda2/envs/tensorflow/lib/python2.7/site-packages/sugartensor/sg_main.py", line 218, in wrapper
    for t in tf.global_variables():
AttributeError: 'module' object has no attribute 'global_variables'

RuntimeError: Graph is finalized and cannot be modified

An error when running train.py

File "D:\Program Files\Anaconda3\envs\tensorflow\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
execfile(filename, namespace)
File "D:\Program Files\Anaconda3\envs\tensorflow\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "E:/SRGAN-master/train.py", line 23, in
data = tf.sg_data.Mnist(batch_size=batch_size)
File "D:\Program Files\Anaconda3\envs\tensorflow\lib\site-packages\sugartensor\sg_data.py", line 54, in init
_data_to_tensor([_train.images, _train.labels.astype('int32')], batch_size, name='train')
File "D:\Program Files\Anaconda3\envs\tensorflow\lib\site-packages\sugartensor\sg_data.py", line 22, in _data_to_tensor
const_list = [tf.constant(data) for data in data_list]
File "D:\Program Files\Anaconda3\envs\tensorflow\lib\site-packages\sugartensor\sg_data.py", line 22, in
const_list = [tf.constant(data) for data in data_list]
File "D:\Program Files\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\constant_op.py", line 220, in constant
name=name).outputs[0]
File "D:\Program Files\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 3246, in create_op
self._check_not_finalized()
File "D:\Program Files\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 2880, in _check_not_finalized
raise RuntimeError("Graph is finalized and cannot be modified.")
RuntimeError: Graph is finalized and cannot be modified.

train.py failing in sugartensor

When running train.py using newest tensorflow release on windows
and python 3.5 I get following trace:

Traceback (most recent call last): File "train.py", line 51, in <module> .sg_periodic_shuffle(factor=2) File "E:\Anaconda3\lib\site-packages\sugartensor\sg_main.py", line 151, in wrapper out = func(tensor, tf.sg_opt(kwargs)) File "E:\Anaconda3\lib\site-packages\sugartensor\sg_transform.py", line 543, in sg_periodic_shuffle for i in range(channel_target): TypeError: 'float' object cannot be interpreted as an integer

Any idea on what might be going wrong?

Error while running train.py

Hi, when i cloned and ran train.py, I ran into error something like this. Could you help?
Here is my errorlog

"train.py", line 51, in
.sg_periodic_shuffle(factor=2))
File "/usr/local/lib/python2.7/dist-packages/sugartensor/sg_main.py", line 151, in wrapper
out = func(tensor, tf.sg_opt(kwargs))
File "/usr/local/lib/python2.7/dist-packages/sugartensor/sg_transform.py", line 584, in sg_periodic_shuffle
out = tf.concat(out, 3)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1075, in concat
dtype=dtypes.int32).get_shape(
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 669, in convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 176, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 165, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 367, in make_tensor_proto
_AssertCompatible(values, dtype)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible
(dtype.name, repr(mismatch), type(mismatch).name))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

how to use my own training images?

hi, i want use some super-resolution images to training srgan ,but i can not find the way to change image dir . could you provide this?

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.