Comments (9)
Hi.
I made a quick fix for this.
Please note the order of the parameters, first height then width:
--image_size [height,width]
Download the patch below and apply it to test.py this way
patch test.py < patch.txt
from deep-exemplar-based-video-colorization.
It has been a long time since i wrote that patch.
As a hint, try a different resolution if you get an error. The width/height has to be dividable by 16, maybe it was a different number.
Hope that helps.
from deep-exemplar-based-video-colorization.
@semel1 I had a similar issue, I ended up forking the repo and changing the default value in test.py
but then I started getting another error likely related to the size I specified being bigger than the input. I'm not sure why the argument didn't work but tbh I didn't spend much time looking into it. Would love to know the answer to this as well. I though it might have something to do with how the model was trained.
from deep-exemplar-based-video-colorization.
@semel1 did you ever make any progress on this? I've been busy with other work but will try to look into it this week.
from deep-exemplar-based-video-colorization.
anyone find out how to change the output resolution? @hrdunn what did you change in test.py?
from deep-exemplar-based-video-colorization.
I fixed mine using @juliokarl 's patch. If your os is windows like mine, then the patch command won't work.
You need to manually open the test.py with notepad and paste
if type(opt.image_size) is str: opt.image_size = eval(opt.image_size)
into the file, right after the following lines:
filenames.sort(key=lambda f: int("".join(filter(str.isdigit, f) or -1)))
# NOTE: resize frames to 216*384
Then, you need to replace this line:
parser.add_argument("--image_size", type=int, default=[216 * 2, 384 * 2], help="the image size, eg. [216,384]")
with this line:
parser.add_argument("--image_size", type=str, default=[216 * 2, 384 * 2], help="the image size, eg. [216,384]")
It's best to create a backup of test.py just in case.
from deep-exemplar-based-video-colorization.
When I change the output resolution with the patch and --image_size I always get this error
Sizes of tensors must match except in dimension 1. Expected size 135 but got size 134 for tensor number 2 in the list.
from deep-exemplar-based-video-colorization.
Yes, no problem, thanks for the quick reply it works but the vram is immediately busy when I go to 1088*1920. You should choose a lower resolution and then transfer the color information to black and white source frame. This is less computationally intensive and hardly distinguishable from the image quality.
from deep-exemplar-based-video-colorization.
The following function first scales the low-resolution color image to the size of the original image and projects only the color information onto the Y channel of the black and white image.
from deep-exemplar-based-video-colorization.
Related Issues (20)
- ModuleNotFoundError: No module named 'cv2' HOT 2
- It seems not correct of the code in TestTransforms.py line 341
- why the light channel data is normalize to 50 HOT 2
- There seems a bug ofr feature centering with x_features - y_features.mean HOT 1
- Questions about the test phase
- training command is wrong. HOT 1
- Training data problem HOT 1
- Training has little effect HOT 1
- Test result problem
- CUDA device error "module 'torch._C' has no attribute '_cuda_setDevice'" when running test.py HOT 4
- Runtime error
- Error 404 - Important files missing HOT 1
- the pretrained models HOT 1
- Documentation for starting the library
- Dataset for Training
- error when colorizing the video 04.jpg module 'cv2' has no attribute 'ximgproc' HOT 1
- Colorization result was different if changing the scale_factor=0.5 to 1.0 in test.py . Not sure why?
- The colab demo version is DEAD
- Update code
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 deep-exemplar-based-video-colorization.