Comments (1)
I have Windows 10 and I was receiving problems as well with this module. I had to make more changes to make it work. This function is mixing datatypes so I had to make all arrays of type numpy float64 to make it consistent.
Starting with the function at line 217:
def blur_blending_cv2(im1, im2, mask):
mask = mask.astype(np.float64) <===include this line
mask /= 255. <===include this line
#mask *= 255. <===comment out
kernel = np.ones((9, 9), np.float64) #np.uint8) <===modify this line
mask = cv2.erode(mask, kernel, iterations=3)
mask_blur = cv2.GaussianBlur(mask, (25, 25), 0)
mask_blur /= 255.
im2 = im2.astype(np.float64) <===include this line
im = im1 * mask_blur + (1. - mask_blur) * im2
im /= 255.0
im = np.clip(im, 0.0, 1.0)
return im
Starting with line 433 I had to modify to:
blended = blur_blending_cv2(warped_back, blended, backward_mask)
#blended *= 255.0 <===comment out
io.imsave(os.path.join(save_url, x), img_as_ubyte(blended)) # (blended / 255.0)) <=== modify
from bringing-old-photos-back-to-life.
Related Issues (20)
- how can I use my own model
- 很多很多问题,应该是没有再维护了
- 尝试从google.protobuf.internal模块导入名为'builder'的子模块时出现了问题
- Not working (conda with env) HOT 5
- Not working HOT 2
- Out of memory error
- : unrecognized arguments HOT 1
- Deprecated dependencies detected
- refined dockerfile HOT 2
- How can I use the GPU on the macbook(m1) ?
- No errors, but output images are blank/white
- IndexError: list index out of range (model on replicate.com) HOT 2
- GUI warns it has gone commercial and a licence will be required
- Dlib dir
- Global and Face_Enhancement weights: Public access is not permitted on this storage account. HOT 1
- "Restore the photos with scratches" section fails with **"FileNotFoundError: [Errno 2] No such file or directory: '/content/photo_restoration/Global/checkpoints/detection/FT_Epoch_latest.pt'"** HOT 1
- 这个项目目前无法使用了 HOT 1
- BOPBtL models missing
- list index out of range
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 bringing-old-photos-back-to-life.