Comments (4)
Thank you for finding this bug.
Actually, I didn't check the codes under ./unstable, you have to debug if you want to use them.
As the question you proposed, you should revise this line to
input = net(torch.stack([tensorPreprocessedFirst, tensorPreprocessedSecond], dim=1))
Hope this works. And if it works, please tell me and I will update the code in this repository.
from pytoflow.
Thanks @Coldog2333. I've been using this to help denoise VHS captures and I think I've successfully trained a model.
Having some issues saving during evaluation though:
plt.imsave(os.path.join(out_img_dir, video, sep, 'out.png'),normalize(predicted_img.permute(1, 2, 0).cpu().detach().numpy()))
Traceback (most recent call last):
File "evaluate2.py", line 172, in <module>
vimeo_evaluate(dataset_dir, './test-result', pathlistfile, task=task, cuda_flag=cuda_flag)
File "evaluate2.py", line 164, in vimeo_evaluate
plt.imsave(os.path.join(out_img_dir, str_format % count),predicted_img.permute(1, 2, 0).cpu().detach().numpy())
File "/home/pete/.local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 2133, in imsave
return matplotlib.image.imsave(fname, arr, **kwargs)
File "/home/pete/.local/lib/python3.6/site-packages/matplotlib/image.py", line 1496, in imsave
rgba = sm.to_rgba(arr, bytes=True)
File "/home/pete/.local/lib/python3.6/site-packages/matplotlib/cm.py", line 271, in to_rgba
raise ValueError("Floating point image RGB values "
ValueError: Floating point image RGB values must be in the 0..1 range.
I'm guessing there's a way to scale the result but unsure the best method yet.
I used:
def normalize(x):
"""
Normalize a list of sample image data in the range of 0 to 1
: x: List of image data. The image shape is (32, 32, 3)
: return: Numpy array of normalized data
"""
return np.array((x - np.min(x)) / (np.max(x) - np.min(x)))
But this seemed to return variations of brightness levels between frames.
from pytoflow.
Normalize wasn't the right approach. I've just clipped the values outside of bounds.
plt.imsave(os.path.join(out_img_dir, video, sep, 'out.png'),np.clip(predicted_img.permute(1, 2, 0).cpu().detach().numpy(),0,1))
from pytoflow.
Please see Issue#6 for the image RGB value restriction problem if needed.
from pytoflow.
Related Issues (19)
- information about trained models HOT 1
- TypeError: __init__() missing 1 required positional argument: 'task' HOT 3
- SR results not clear HOT 2
- Why SR results is one output image? HOT 4
- 2x model HOT 4
- Issue in SSIM implementation HOT 2
- evaluate.py can only output 1 frame from 7 LR frames? HOT 1
- some error
- Question About Super Resolution HOT 1
- the mask network
- run.py has some detail to modify
- ValueError: Floating point image RGB values must be in the 0..1 range.
- "tiny.zip" download link failed! HOT 2
- About the evaluation results HOT 3
- A question about the performance against the official implementation HOT 1
- problems when using pytoflow HOT 7
- VHS Denoise Model + Training Set HOT 2
- License?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytoflow.