Comments (9)
I managed to figure this out. You can set image width and height in test.py to your image size, but you also need to change the patch size in model/sttn.py. This resolves issue #7
test.py, line 40:
w, h = [your_image_width, your_image_height]
model/sttn.py, line 70:
patchsize = [(image_height / 4, image_width / 4), (image_height / 8, image_width / 8), (image_height / 16, image_width / 16), (image_height / 32, image_width / 32)]
This worked for me at 256x256 resolution. I was worried that the weights wouldn't load because of the patch size change but it doesn't seem to be a problem.
ref_length
is how many frames the model takes as a reference for one inpainted frame, neighbour_stride
is how many it jumps, or strides, along the frames in the loop. It's got nothing to do with the image sizes.
from sttn.
Hi, and thanks! I have tried this at 1920x1080 resolution and I get a CUDA out of memory error.(Single RTX 3090).
Would changing ref_length or neighbour_stride help with this?
from sttn.
I'm not sure, perhaps changing the ref_length would help as it's attending to fewer frames but I don't know as I haven't looked into this. Don't want to make this discussion off-topic, I suggest closing the issue if my fix above solved your problem.
from sttn.
Hard to say if it fixes the issue as I cant run it, but as it is running out of memory, i assume that it is trying. Thanks for your help!
from sttn.
I managed to figure this out. You can set image width and height in test.py to your image size, but you also need to change the patch size in model/sttn.py. This resolves issue #7
test.py, line 40:
w, h = [your_image_width, your_image_height]
model/sttn.py, line 70:
patchsize = [(image_height / 4, image_width / 4), (image_height / 8, image_width / 8), (image_height / 16, image_width / 16), (image_height / 32, image_width / 32)]
This worked for me at 256x256 resolution. I was worried that the weights wouldn't load because of the patch size change but it doesn't seem to be a problem.
ref_length
is how many frames the model takes as a reference for one inpainted frame,neighbour_stride
is how many it jumps, or strides, along the frames in the loop. It's got nothing to do with the image sizes.
Hi, seems patchsize
in model/sttn.py has different calculalte method with your method.
Code in test.py and model/sttn.py list blow:
w, h = 432, 240
patchsize = [(108, 60), (36, 20), (18, 10), (9, 5)]
If using your post the patchsize should be [(108.0, 60.0), (54.0, 30.0), (27.0, 15.0), (13.5, 7.5)]
. And how should we deal with float than integer.
from sttn.
Hi, yes i did some further work on this after my comment. The patch size calculations I outlined in my original comment work for 256x256 resolution, but for other resolutions you need to make sure that the resolution can be divided by the patch size evenly (i.e. into integers, not floats). You don't have to go down in patch size by factors of 4, 8, 16, and 32 (e.g. in the original code the factors are 4, 12, 24, and 48).
from sttn.
@alex-flwls thanks for your further explanation. So the target of set patchsize
is to get the factors?
from sttn.
It's just a workaround, the code doesn't seem like it was written to support multiple resolutions. You can get around it by adjusting the patch sizes.
from sttn.
@alex-flwls I'll try it, thanks.
from sttn.
Related Issues (15)
- Could you share other pretrained model? HOT 1
- Trained model performance HOT 2
- IndexError: index 1 is out of bounds for dimension 0 with size 1
- DAVIS2018 does not exist HOT 4
- How to increase the output size as large as the input size HOT 1
- how to change the output video size
- Youtube-VOS HOT 2
- sample_length = 5?
- Training with custom dataset and masks HOT 1
- How to calculate Ewarp? HOT 1
- About train
- Out of CUDA memory when training HOT 3
- Would training only a sequence of frames from a video improve the training speed?
- Missing dis.pth and opt.pth files for fine-tuning
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 sttn.