Comments (2)
I have now tested. For others coming here, what you need to do is drop to a console and literally type python3 from bash on it's own then press .
After that, copy and paste the code into the python console that comes up.
The files will be downloaded into your users home directoy under .cache/modelscope.
Your python window will seem to be hung, however CTRL-C, CTRL-D gets you out of it. The last line I had is as below, which I assume is the correct last line:
>>> cv2.imwrite('result.png', result[OutputKeys.OUTPUT_IMG])
If possible, this should be updated in the instructions.
from gpen.
Ah, I've seen another link now at the top of the page, it seems in the guide you're missing the part where it says the script is run in python. Might be obvious to a developer, but wasn't to me.
E.g. should read as below (you're missing the word python)
python
import cv2
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
from modelscope.outputs import OutputKeys
portrait_enhancement = pipeline(Tasks.image_portrait_enhancement, model='damo/cv_gpen_image-portrait-enhancement-hires')
result = portrait_enhancement('https://modelscope.oss-cn-beijing.aliyuncs.com/test/images/marilyn_monroe_4.jpg')
cv2.imwrite('result.png', result[OutputKeys.OUTPUT_IMG])
Haven't tested this yet, but will do.
from gpen.
Related Issues (20)
- why do you blur twice with the same guassian kernel?
- Training the Inpainting model
- Can it work on RGBA images?
- Have you tried with your FullGenerator_SR model?
- Confusing in the umeyama implementation. HOT 1
- Can't manage to find a download link for GPEN-BFR-2048 model. HOT 2
- about automatically rotated
- About the input resolution of "net_d.pt"
- TensorRT deployment HOT 3
- 部分人脸会出现磨皮很严重和人脸凭空出现黑痣的现象,有解决思路吗 HOT 1
- 你好,发布一个可微调的GPEN-BFR-512模型吗?
- FullGenerator_SR
- eval lpips HOT 4
- Training results are normal, but test results abnormality HOT 1
- from face_detect.retinaface_detection import RetinaFaceDetection ModuleNotFoundError: No module named 'face_detect'
- why no weight_decay and scheduler for train_simple.py?
- How to convert FullGenerator to ONNX
- GPEN-BFR-2048 in ONNX format
- Adversarial Loss without any change at 0.69
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 gpen.