Comments (11)
These warnings are irrelevant. To improve the image quality, you can enable 'use_sr' option which will call face_enhancement. However, the pix2pix super resolution is not good, I'm working on an alternative model.
from ghost.
There are also 2 errors shown, maybe this gives a clue:
sberswap\lib\site-packages\torch\nn\functional.py:3000: UserWarning: The default behavior for interpolate/upsample with float scale_factor changed in 1.6.0 to align with other frameworks/libraries, and uses scale_factor directly, instead of relying on the computed output size. If you wish to keep the old behavior, please set recompute_scale_factor=True. See the documentation of nn.Upsample for details. warnings.warn("The default behavior for interpolate/upsample with float scale_factor changed "
and
sberswap\lib\site-packages\kornia\augmentation\augmentation.py:1833: DeprecationWarning: GaussianBlur is no longer maintained and will be removed from the future versions. Please use RandomGaussianBlur instead. category=DeprecationWarning,
from ghost.
I tried use_sr but it didn't make a huge difference. Still somewhat blurry and suboptimal.
What alternative model are you looking at, something like GPEN/GFPGAN?
from ghost.
Hi, @epicstar7! The output face may look blurry because our model only generates a 256x256 resolution. To solve this problem, you can look at the face enhancement function. If you need a stronger super resolution model, check out sber-swap implementation with the GFPGAN sr model SberSwapInferenceGFPGAN.ipynb. It scales the output images up to 512x512 and the faces look more detailed. However, in this case, the inference time is longer.
from ghost.
Thanks a lot @AlexanderGroshev, let me try it. Is there a way to run this code from the conda commandline instead of a ipynb script file? I'm not really sure how to translate it to the right commands on there.
from ghost.
@epicstar7 check inference_GFPGAN.py:
python inference_GFPGAN.py --source_paths examples/images/beckham.jpg --target_video examples/videos/nggyup.mp4 --use_sr True
You need to clone GFPGAN repository, download weights GFPGANCleanv1-NoCE-C2.pth
and place to GFPGAN/experiments/pretrained_models/
folder
from ghost.
This works mate, amazing job, this is a great improvement to this repo. Thanks!
from ghost.
I do get an error CUDA out of memory when trying to swap on video. I'm curious to know why this happens for videos while for single images there is no issue. This shouldn't happen right?
from ghost.
@epicstar7, try to reduce batch size, it might help.
from ghost.
This works, changed it with -batch_size 16 and now no CUDA memory error any more. But the face is not swapped in the output video!
from ghost.
Managed to get it working using a targetimage of the face. I noticed though swapping is sometimes failing after just a few frames in the video. You see the swapped face for a few frames and then it just returns to the original pictures. Any thoughts why this happens?
from ghost.
Related Issues (20)
- ModuleNotFoundError: No module named 'mxnet' HOT 2
- No module named 'insightface' HOT 1
- errors occure when the input video contains some no-face fragments
- google cloud is closed HOT 1
- Google Cloud is unavailable and banned! ! HOT 3
- Where
- Juanes
- TypeError: RetinaFace.detect() got an unexpected keyword argument 'threshold'
- Output is black blob on face of target image -- tips for debug?
- Suspicious/malicious file with binary incoded as base64 ofuscating as png image HOT 1
- Error when loading "Preparation" section HOT 1
- colab error OSError: libcudart.so.11.0: cannot open shared object file: No such file or directory HOT 1
- what is a model license? HOT 3
- Inconsistent requirements HOT 1
- Vgg2 dataset cannot be downloaded HOT 2
- How to Only Save the Best Model During Training
- Requirements.txt
- Need Help Resolving Critical Errors in Code
- Google blocks colab file
- Google colab is not working HOT 2
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 ghost.