Comments (9)
Hi @nieyan,
PyNET is a relatively big model, therefore it won't be possible to run it on embedded devices in real time. However, if the resolution of the images is quite small (less than 3MP), then it should be possible to optimize it (e.g., by disabling some layers / levels) for mobile devices.
@scoobym, do you have this OOM exception during the training or testing the model?
from pynet-pytorch.
Thanks for your great work! Could PyNET deploy in embedding device's cpu with real time FPS ? I am curious about PyNET's resource comsume.
I have the same problem, so i tried it on my gpu(rtx 2080ti), found that the model was too big to fit a single GPU. RuntimeError: CUDA out of memory. Tried to allocate 130.12 MiB (GPU 0; 10.76 GiB total capacity; 9.57 GiB already allocated; 7.12 MiB free; 190.92 MiB cached)
. So I'm afraid the model cannot run in real time on an embedded device.
from pynet-pytorch.
@scoobym I have a similar error.I tried to use 6 TITAN XP(each has 12G RAM)to train the model,and OOM appears when level = 1. But when level = 0, the RAM is enough.
Even I change the batchsize to 1 when level = 1, OOM appears still.
But I use the tensorflow version of PyNET, there's no OOM error, if you want to train by your self you can try the tensorflow version of PyNET too.
A another problem is that the whole training process took about 3-4days (I skip level 1 just training level 0 after level 2, and other settings like batchsize and epochs are same to the description at README.md). It is really slow.
from pynet-pytorch.
Hi @scoobym,
If you are training the model, then the size of the input patches should be 224x224x4:
device = torch.device("cuda")
generator = PyNET(level=0, instance_norm=True, instance_norm_level_1=True).to(device)
input = torch.rand([1, 4, 224, 224]).float().to(device)
output = generator(input)
If you are validating the model, then you should use torch.no_grad() to avoid the computation of the gradients:
device = torch.device("cuda")
generator = PyNET(level=0, instance_norm=True, instance_norm_level_1=True).to(device)
input = torch.rand([1, 4, 448, 448]).float().to(device)
generator.eval()
with torch.no_grad():
output = generator(input)
Please note that I was able to run the above two examples on one GPU with only 3GB of RAM, therefore you shouldn't have any issues with Nvidia 2080 Ti.
@Jam-G, the mentioned OOM issue is happening during the validation process. To avoid it, just reduce the resolution of the validation images from 1280x1280 pixels to e.g., 960x960.
from pynet-pytorch.
@aiff22 I just run the code below and find that when level = 0 or 1, oom appears. Probably because the memory of 2080ti is too small, only 11G.
generator = PyNET(level=0, instance_norm=True, instance_norm_level_1=True).to(device) a = torch.rand([1,3,448,448]).float().to(device) b = generator(a)
from pynet-pytorch.
@aiff22 Thank you! I want to train the model on my own data, so I changed the channel to 3.
from pynet-pytorch.
@aiff22 thanks!I have a try.
from pynet-pytorch.
@aiff22
I have a similar problem.
When I run inference using level 0 and level 1, it will remind me that OOM.
I test it in 4*1080ti.
from pynet-pytorch.
@XGBoost, please look at the following answer.
from pynet-pytorch.
Related Issues (20)
- Minimal working example produces red tinted images on forward inference HOT 2
- Tensor size mismatch when testing on own png HOT 5
- About the preprocess of the dataset alignment HOT 3
- Problems when unzip the dataset HOT 1
- Is there any result comparsion with the AIM2019 RAW2RGB TOP1(MOS) solution? HOT 1
- can't download model from google drive HOT 2
- Training problem HOT 3
- Model
- Weight input mismatch HOT 1
- A comparsion with the AIM2020 Image Signal Processing Challenge HOT 2
- How to convert raw images to Visualized RAW Images like yours paper examples HOT 1
- The dataset is different compared with tensorflow version
- Training Bokeh Problem
- Tensorflow vs Pytorch Activation Functions
- extract_bayer_channels HOT 1
- Can not download the Zurich RAW to RGB dataset HOT 2
- Cannot download the pretrain model HOT 2
- data preprocessing code of Zurich RAW to RGB dataset
- How to get visualized image?
- [Request] data preprocessing code for RAW andd RGB alignment
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 pynet-pytorch.