GithubHelp home page GithubHelp logo

Comments (9)

juliokarl avatar juliokarl commented on June 15, 2024 1

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

patch.txt

from deep-exemplar-based-video-colorization.

juliokarl avatar juliokarl commented on June 15, 2024 1

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.

hrdunn avatar hrdunn commented on June 15, 2024

@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.

hrdunn avatar hrdunn commented on June 15, 2024

@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.

orangpelupa avatar orangpelupa commented on June 15, 2024

anyone find out how to change the output resolution? @hrdunn what did you change in test.py?

from deep-exemplar-based-video-colorization.

UpscaleHistory avatar UpscaleHistory commented on June 15, 2024

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.

enteranon avatar enteranon commented on June 15, 2024

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.

enteranon avatar enteranon commented on June 15, 2024

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.

enteranon avatar enteranon commented on June 15, 2024

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.

colorconvertertosourcebw.txt

from deep-exemplar-based-video-colorization.

Related Issues (20)

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.