zhaozunjin / retinexdip Goto Github PK
View Code? Open in Web Editor NEWThe pytorch implementation of RetinexDIP, a unified zero-reference deep framework for low-light enhancement.
License: MIT License
The pytorch implementation of RetinexDIP, a unified zero-reference deep framework for low-light enhancement.
License: MIT License
Hi, it's a good job. May I ask how to calculate NIQE?
(R, G, B) = self.img.split()这个是原图
ini_illumination = torch_to_np(self.illumination_out).transpose(1, 2, 0)
# ini_illumination = misc.imresize(ini_illumination, (self.size[1], self.size[0]))
ini_illumination = cv2.resize(ini_illumination, (self.size[0], self.size[1]))
# print(ini_illumination.shape)
ini_illumination = np.max(ini_illumination, axis=2)
ini_illumination_renorm = (255 * ini_illumination).astype('uint8')
# cv2.imwrite('output/illumination/illumination-{}.png'.format(step), ini_illumination_renorm)
# If the input image is extremely dark, setting the flag as True can produce promising result.
if flag==True:
ini_illumination = np.clip(np.max(ini_illumination, axis=2), 0.0000002, 255)
else:
ini_illumination = np.clip(self.adjust_gammma(ini_illumination), 0.0000002, 255)
R = R / ini_illumination
G = G / ini_illumination
B = B / ini_illumination
self.best_result = np.clip(cv2.merge([B, G, R])*255, 0.02, 255).astype(np.uint8)
cv2.imwrite('output/result-{}.png'.format(step), self.best_result)
The code can run through after modification, but the image is almost white after enhancement
Dear zhaozunjin, I'm sorry to bother you, but I have something to ask you. It seems that there is no indicator test code in your code. Could you share the test code of NIQE, NIQMC and CPCQI with me? If you can send it to email: [email protected] 。 Thank you very much for your sharing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.