Git Product home page Git Product logo

super_resolution's Introduction

Super Resolution

  • Enhance low resolution image to high resolution image

Click image to see Youtube video!
result.png

Dependencies

  • Python 3+
  • Keras
  • numpy
  • OpenCV
  • scikit-image
  • matplotlib (for visualization)

super_resolution's People

Contributors

kairess 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

super_resolution's Issues

train 파일 ValueError 문의 x_test/ 밑에 파일들 처리시

train 파일에서
아래와 같은 오류가 계속 발생해야 하는데 어떻게 수정 할 수 있을 까요?

19962 19962
/home/ubuntu/SuperResolution/super_resolution-master/processed/x_test/182638.npy
Traceback (most recent call last):
File "train.py", line 99, in
y_pred = model.predict(x1_test.reshape((1, 44, 44, 3)))
ValueError: cannot reshape array of size 1936 into shape (1,44,44,3)

y_train 용량

y_train 용량이 얼마나 만들어지나요? 88G 까지 만들다가 용량 없어서 에러 나네요 ㅜㅜ

ModelCheckpoint 작업시 에러

history = model.fit_generator(train_gen, validation_data=val_gen, epochs=10, verbose=1, callbacks=[
ModelCheckpoint(r'models\model.h5', monitor='val_loss', verbose=1, save_best_only=True)
])

위 셀 실행시 아래와 같은 오류가 납니다.
왜 그런건가요 그대로 했는데...
알려주세요
이건 있던 모델인데
모델을 직접 만들어야 하나요?

IndexError Traceback (most recent call last)
in
----> 1 history = model.fit_generator(train_gen, validation_data=val_gen, epochs=10, verbose=1, callbacks=[
2 ModelCheckpoint(r'models\model.h5', monitor='val_loss', verbose=1, save_best_only=True)
3 ])

~\anaconda3\lib\site-packages\tensorflow\python\util\deprecation.py in new_func(*args, **kwargs)
322 'in a future version' if date is None else ('after %s' % date),
323 instructions)
--> 324 return func(*args, **kwargs)
325 return tf_decorator.make_decorator(
326 func, new_func, 'deprecated',

~\anaconda3\lib\site-packages\tensorflow\python\keras\engine\training.py in fit_generator(self, generator, steps_per_epoch, epochs, verbose, callbacks, validation_data, validation_steps, validation_freq, class_weight, max_queue_size, workers, use_multiprocessing, shuffle, initial_epoch)
1813 """
1814 _keras_api_gauge.get_cell('fit_generator').set(True)
-> 1815 return self.fit(
1816 generator,
1817 steps_per_epoch=steps_per_epoch,

~\anaconda3\lib\site-packages\tensorflow\python\keras\engine\training.py in _method_wrapper(self, *args, **kwargs)
106 def _method_wrapper(self, *args, **kwargs):
107 if not self._in_multi_worker_mode(): # pylint: disable=protected-access
--> 108 return method(self, *args, **kwargs)
109
110 # Running inside run_distribute_coordinator already.

~\anaconda3\lib\site-packages\tensorflow\python\keras\engine\training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_batch_size, validation_freq, max_queue_size, workers, use_multiprocessing)
1047 training_utils.RespectCompiledTrainableState(self):
1048 # Creates a tf.data.Dataset and handles batch and epoch iteration.
-> 1049 data_handler = data_adapter.DataHandler(
1050 x=x,
1051 y=y,

~\anaconda3\lib\site-packages\tensorflow\python\keras\engine\data_adapter.py in init(self, x, y, sample_weight, batch_size, steps_per_epoch, initial_epoch, epochs, shuffle, class_weight, max_queue_size, workers, use_multiprocessing, model, steps_per_execution)
1103
1104 adapter_cls = select_data_adapter(x, y)
-> 1105 self._adapter = adapter_cls(
1106 x,
1107 y,

~\anaconda3\lib\site-packages\tensorflow\python\keras\engine\data_adapter.py in init(self, x, y, sample_weights, shuffle, workers, use_multiprocessing, max_queue_size, model, **kwargs)
907 self._keras_sequence = x
908 self._enqueuer = None
--> 909 super(KerasSequenceAdapter, self).init(
910 x,
911 shuffle=False, # Shuffle is handed in the _make_callable override.

~\anaconda3\lib\site-packages\tensorflow\python\keras\engine\data_adapter.py in init(self, x, y, sample_weights, workers, use_multiprocessing, max_queue_size, model, **kwargs)
784 # Since we have to know the dtype of the python generator when we build the
785 # dataset, we have to look at a batch to infer the structure.
--> 786 peek, x = self._peek_and_restore(x)
787 peek = self._standardize_batch(peek)
788 peek = _process_tensorlike(peek)

~\anaconda3\lib\site-packages\tensorflow\python\keras\engine\data_adapter.py in _peek_and_restore(x)
918 @staticmethod
919 def _peek_and_restore(x):
--> 920 return x[0], x
921
922 def _handle_multiprocessing(self, x, workers, use_multiprocessing,

~\Desktop...\DataGenerator.py in getitem(self, index)
30
31 # Generate data
---> 32 X, y = self.__data_generation(list_IDs_temp)
33
34 return X, y

~\Desktop,..SuperResolution\DataGenerator.py in __data_generation(self, list_IDs_temp)
52
53 splited = ID.split('/')
---> 54 splited[-2] = 'y' + splited[-2][1:] # x_train -> y_train
55 y_path = os.path.join(os.sep, *splited)
56

IndexError: list index out of range

그리고 그래픽 카드 메모리를 확 차지하네요 90% 이상 fit_generator 실행하면 에러나면서

케라스 , 텐서플로 호환 버전

이 학습 잘 돌아가는 케라스 , 텐서 플로 버전이 어떻게 되나요?
fit_generator 에서 아래와 같은 오류 나고 Epoch 1/10 에서 오류 납니다.
WARNING:tensorflow:From :1: Model.fit_generator (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version.
Instructions for updating:
Please use Model.fit, which supports generators
Epoch 1/10

UnknownError Traceback (most recent call last)
...

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.