2wins / srmd-pytorch Goto Github PK
View Code? Open in Web Editor NEWA PyTorch Implementation of "Learning a Single Convolutional Super-Resolution Network for Multiple Degradations"
A PyTorch Implementation of "Learning a Single Convolutional Super-Resolution Network for Multiple Degradations"
thanks very much!!!!
In torchvision the default degradation method is PIL.Image.BILINEAR
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /env/main (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7ffad98234e0>: Failed to establish a new connection: [Errno 111] Connection refused',))
In the solver.py, the test code is pass.
# TODO: to be implemented
def test(self):
pass
Hi, could you please tell me how to implement anisotropy gaussian kernel in python? I'm still confused after reading your code. And how to stretch the dimensinality of the blur kernel. I want to ask you some questions on implement SRMD, but it's not very convinient to communicate at here, so could you please give me your email? Thanks a lot!!!!!!!!
hi, I am a student who are doing a project about medical imageing, and I have a keen desire on your training code, hope that I can get your response from Email. Thanks a lot!
/usr/bin/python3.5 /home/prl/fg-foucouse/CODE/SRMD-pytorch-master/main.py
Namespace(batch_size=2, beta1=0.5, beta2=0.999, conv_dim=128, device=device(type='cuda'), image_path='./Database/train', image_size=40, iteration=0, log_path='./logs', log_step=10, lr=0.001, mode='train', model_save_path='./models', model_save_step=1000, num_blocks=11, num_channels=18, num_workers=4, pause=0, result_path='./results', sample_step=100, scale_factor=2, total_step=200000, trained_model=None, use_tensorboard=True)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 137, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 91, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 81, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 560, in urlopen
body=body, headers=headers)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 354, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 162, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 146, in _new_conn
self, "Failed to establish a new connection: %s" % e)
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.HTTPConnection object at 0x7fcfc88434e0>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 376, in send
timeout=timeout
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 610, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 273, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /env/main (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fcfc88434e0>: Failed to establish a new connection: [Errno 111] Connection refused',))
During handling of the above exception, another exception occurred:
[10/200000] loss: 0.0945
[20/200000] loss: 0.0290
[30/200000] loss: 0.1119
[40/200000] loss: 0.0920
[50/200000] loss: 0.0257
[60/200000] loss: 0.0757
[70/200000] loss: 0.0377
[80/200000] loss: 0.0347
[90/200000] loss: 0.0277
/usr/local/lib/python3.5/dist-packages/torch/nn/modules/upsampling.py:122: UserWarning: nn.Upsampling is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.Upsampling is deprecated. Use nn.functional.interpolate instead.")
[100/200000] loss: 0.0736
Traceback (most recent call last):
File "/home/prl/fg-foucouse/CODE/SRMD-pytorch-master/main.py", line 100, in
main(config, scope=locals())
File "/home/prl/fg-foucouse/CODE/SRMD-pytorch-master/main.py", line 51, in main
solver.train()
File "/home/prl/fg-foucouse/CODE/SRMD-pytorch-master/solver.py", line 130, in train
tmp = np.squeeze(grid.numpy().transpose((1, 2, 0)))
TypeError: can't convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
Exception ignored in: <bound method _DataLoaderIter.del of <torch.utils.data.dataloader._DataLoaderIter object at 0x7fd036af0208>>
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 399, in del
self._shutdown_workers()
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 378, in _shutdown_workers
self.worker_result_queue.get()
File "/usr/lib/python3.5/multiprocessing/queues.py", line 345, in get
return ForkingPickler.loads(res)
File "/usr/local/lib/python3.5/dist-packages/torch/multiprocessing/reductions.py", line 151, in rebuild_storage_fd
fd = df.detach()
File "/usr/lib/python3.5/multiprocessing/resource_sharer.py", line 57, in detach
with _resource_sharer.get_connection(self._id) as conn:
File "/usr/lib/python3.5/multiprocessing/resource_sharer.py", line 87, in get_connection
c = Client(address, authkey=process.current_process().authkey)
File "/usr/lib/python3.5/multiprocessing/connection.py", line 487, in Client
c = SocketClient(address)
File "/usr/lib/python3.5/multiprocessing/connection.py", line 614, in SocketClient
s.connect(address)
ConnectionRefusedError: [Errno 111] Connection refused
Hi, could you teach me how to generate the degradation maps, and how to concatenate with the LR image? Could you upload the codes? Thanks very much!
I find the file 'net.meta.P' in your codes, whose size is 15x255, could you tell me how to make it? Could you please offer the code to make new.meta.p ?
Could you tell some details?
Thanks!
As you can see from the code, the input to the network is 18-dimensional. What should I do with input images when I perform the prediction?
In torchvision the default degradation method is PIL.Image.BILINEAR
0.0
Hi,
Thanks for your work. I am using your code to train the SRMD model. But I can not get expectation results. And in your readme file, the results in the img folder is not very clear and clean. So I want to know whether you can get the same results as good as the SRMD paper. Thanks a lot.
Is the dataset used for training available online? Is there any way it could be uploaded?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.