tengyu1998 / sci Goto Github PK
View Code? Open in Web Editor NEW[CVPR 2022 Oral] This is the official code for the paper "Toward Fast, Flexible, and Robust Low-Light Image Enhancement".
License: MIT License
[CVPR 2022 Oral] This is the official code for the paper "Toward Fast, Flexible, and Robust Low-Light Image Enhancement".
License: MIT License
您好,想了解一下文中提到的与RUAS进行结合具体是如何做的。
论文中提到用使用SCI培训RUAS,即RUAS (1) + SCI
请问作者是如何使用SCI培训RUAS的,是把SCI中模型中的一部分整合到RUAS模型里吗
您好,非常感谢您分享您的项目。
直接通过git拷贝您的代码至本地,运行时发现存在以下三个模型,请问各自的释义是什么,有何区别?
difficult.pt
、easy.pt
、medium.pt
另,直接测试的时候发现部分正常图在使用您的模型后存在图像过曝的情况,反观Zero-dce++模型出现过曝的情况就很小,请问您有和该模型做过实际数据对比吗
您好,我看到代码中一段取patch的代码被注释掉了(同时默认的batch size是1),请问您最终的模型(也就是论文中提到的batch size 为8的模型)是否采用patch进行训练呢。
Dear author:
In the paper, the measurement of psnr and ssim of SCI in LSRW and MIT was mentioned. Could you please publish the code of measurement or send it to me privately? I would be very grateful
@tengyu1998 Could you please release the link to Supplemental Materials of this paper?
I successfully ran test.py, but the saved image only had an enhanced image called .png. This image is the result of the model processing the last image. How can I save each processed enhanced image? (as per original file name)
The result printed after running test.py is:
processing .png
processing .png
processing .png
processing .png
processing .png
.......
Thank you for sharing your wonderful achievements.
What is the license for this repository?
CalibrateNetwork contain the Self-Calibrated Module, but there is a linear function "delta = input - fea" which is not explained in the artical, could you explain what this function does?
Line 84 in 36195a9
Since I am stupid, I want to learn your master model. Can I send the master model code publicly or privately? Thank you very much for your guidance
Dear authors, thanks for your great work.
Could you provide the details or link to the MIT 5K dataset employed in these experiments? (there are many different versions out there).
Also if possible, could you provide processed images from your method, just for qualitative comparisons.
Best.
for i in range(self.stage):
inlist.append(input_op)
i = self.enhance(input_op)
r = input / i
and
# output: output input:input
def forward(self, input, output):
self.output = output
self.input = self.rgb2yCbCr(input)
self.input = input
Hi, I am using the following converted model:
https://github.com/PINTO0309/PINTO_model_zoo/tree/main/286_SCI
Unfortunately, the lighter part of the images is permanently overexposed.
I don't see such effect in your sample images, from the article.
Am I missing something?
How did you use the ACDC night data set in PSPNet? I see no label data in ACDC. Is this segmented data labeled with label software?
您在分割实验中是使用ACDC训练集中的500张图片吗,如果方便的话可以麻烦您提供一下您的训练集吗?
You wrote in your paper that 100 images from the MIT dataset and 50 images from the LSRW dataset were randomly sampled for testing. So, are the training images for the model all the remaining images in the MIT dataset and the LSRW dataset?? If it is convenient, can you send me a copy of the randomly selected test images and the training images you used, so that I can conduct a quantitative comparison experiment with your quantitative results.
Hope to get your reply!
😊
Thanks for your sharing.
Here is a little confusion about the code. I wonder what is the reason that you implement the FinetuneNetwork
by dividing the input by the enhanced output? Appreciate your reply in advance.
def forward(self, input):
i = self.enhance(input)
r = input / i
https://github.com/vis-opt-group/SCI/blob/f44d6ec28c5e18abed33f96a0ab5bef789d18785/model.py#L155
有个小疑问,如果单个模块就能完成推理,为什么训练阶段不直接训练单个模块,而要级联多个模块一起训练?我看到论文中有tSEN实验的说明,认为模型第一、二、三阶段能够收敛到相同的点,既然如此,只采用第一阶段已经能够完成任务,为何还要加第二、三阶段的模型?
Thanks for your amazing work.
I want to learn more details about the framework of SCI.
Could you please release the sup materials in your arxiv version paper?
Hi, in your paper you propose a simple fidelity loss that computes the difference between
Hi! Dear author! I've read your excellent paper recently. Since you didn't mention training data in the paper, I ran your code with training and testing dataset of LOL in your docker environment (cuda==11.1, pytorch==1.8.0). But the result images skew to green.
Besides, I ran it in my own Windows environment (cuda==11.7, pytorch==1.12.1) and the result skew to yellow.
I'm wondering if there is anything wrong with the code or other settings.
And I also ran your code in MIT5k and SICE dataset (which have multi-exposed images) and the result images seem like the model didn't apply any enhancement at all.
So could you please provide your training data for three models you offered in your repo? I really want to reproduce the results in the paper.
Looking forward to your reply :)
After running finetune.py in its entirety, I got a few different png image files as a result. But I didn't find the new weights after finetune in the results folder.
Thanks for your great work,
I would like to know how to implement joint training in SCI, as you mentioned in the paper.
The reinforced version is SCI+, right?
Do you plan to release the source code for this part?
And could you provide the equation of losses for detection and enhancement?
您好,这是我更改后的test.py代码:
import cv2
import numpy as np
import os
import torch
import torch.utils
from torch.autograd import Variable
from SCI_model import Finetunemodel
class MemoryFriendlyLoader(torch.utils.data.Dataset):
def __init__(self, img_dir):
self.low_img_dir = img_dir
self.train_low_data_names = []
for root, dirs, names in os.walk(self.low_img_dir):
for name in names:
self.train_low_data_names.append(os.path.join(root, name))
self.train_low_data_names.sort()
self.count = len(self.train_low_data_names)
def transform(self, image):
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
image = image.transpose((2, 0, 1))
image = image.astype(np.float32) / 255.0
image = torch.from_numpy(image)
return image
def load_images_transform(self, file):
# 使用 OpenCV 读入图片
im_cv = cv2.imread(file)
# 调整图像大小
im_np = cv2.resize(im_cv, (600, 400))
# 将 NumPy 数组转换为 PyTorch Tensor
im = self.transform(im_np)
return im
def __getitem__(self, index):
low_file = self.train_low_data_names[index]
low = self.load_images_transform(low_file)
return low, low_file
def __len__(self):
return self.count
def main():
modelPath = './SCI_weights/medium.pt'
savePath = './SCI_results/medium'
dataPath = './SCI_data/medium'
os.makedirs(savePath, exist_ok=True)
TestDataset = MemoryFriendlyLoader(img_dir=dataPath)
test_queue = torch.utils.data.DataLoader(
TestDataset, batch_size=1,
pin_memory=True, num_workers=0)
model = Finetunemodel(modelPath)
model = model.cuda()
model.eval()
with torch.no_grad():
for _, (input, image_name) in enumerate(test_queue):
input = Variable(input, volatile=True).cuda()
i, r = model(input)
image_numpy = r[0].cpu().float().numpy()
image_numpy = (np.transpose(image_numpy, (1, 2, 0)))
image_numpy = np.clip(image_numpy * 255, 0, 255)
image_cv = cv2.cvtColor(image_numpy, cv2.COLOR_RGB2BGR).astype(np.uint8) # 将 NumPy 数组转换为 OpenCV 图片
cv2.imshow("result", image_cv)
cv2.waitKey(0)
if __name__ == '__main__':
main()
How to find the optimal weight and How to find the optimal weight and how to use the accuracy function in the utilis script?
我想知道关于medium.pt和difficult.pt的训练细节。对于medium.pt,是用多少张LOL和LSRW数据集中的图片进行训练的;对于difficult.pt,论文中提到用了DarkFace中的1000张测试图片,但我下载DarkFace数据集(https://flyywh.github.io/CVPRW2019LowLight/)之后,发现训练集(training/validation images and labels)中有6000张图片,测试集(sample testing images)中只有100张图片,您在训练过程中使用的是在训练集中随机挑选的1000张图片吗,如果方便的话可以麻烦您提供一下您的训练集吗?
期待您的回复。
您好,为什么在自己数据集上训练的一点效果都没有呢。是还需要修改什么部分吗
def norm(self, tensor, p):
return torch.mean(torch.pow(torch.abs(tensor), p))
...
pixel_grad1 = w1 * self.norm((self.output[:, :, 1:, :] - self.output[:, :, :-1, :]), p)
Since the result of self.norm() is a scalar, the weights can't be done as the same as the equation(5) mentioned in your paper.
Maybe it should be like:
pixel_grad1 = w1 * torch.norm(self.output[:, :, 1:, :] - self.output[:, :, :-1, :], p, dim=1, keepdim=True)
Another Problems is:
sigma_color = -1.0 / 2 * self.sigma * self.sigma
which should be :
sigma_color = -1.0 / (2 * self.sigma * self.sigma)
请问 论文中提到的自校准模块(Self-Calibrated Module)和关照估计(Illumination Estimation)是在代码中的哪一部分呢?
麻烦您答疑解惑一下
Hello,dear author!I really appreciate your work!
Sorry to bother you.I am trying to run train.py to retrain the model and I've changed the path of my MIT dataset,but in training process the loss is not converged.Is there any requirement for the storage path of the dataset?Could you describe more details about the training process in document?THANKS SINCERELY!
Can you share your training codes? I want to go deep, I also want to try our dataset from our camera.
Hi, just want to know is there any possibility that I can use this work for over exposure images correction. Thanks!
Hi, I would like to perform the inference using onnx model format. My converted onnx model produces an output that's same as input. Is the model compatible to convert to onnx and have you tried doing this operation earlier?
为什么我用LOL数据集训练会出现图片过红的问题,而且增加的亮度也远远不如作者的模型
作者您好,关于计算效率,我有两个问题。
1、推理时间是否也是在TITAN X上测试的?是单张图片进行推理还是一个batch?图片尺寸是多大的呢?
2、其他方法的推理时间是否是您个人测试的?
感谢!
Hello, authors! I would like to know which weight version you use for PSPNet. Have you retrained or finetuned PSPNet on the training images and labels of the ACDC dataset?
Thanks!
Thanks for author's great works.
I want to know why using YUV domain for weighting calculation in smoothness loss instead of just using RGB domain.
Hi, I'm new in this area and I'm not quiet understand how the self-calibrated module works. Here are my questions:
Actually, our constructed self-calibrated module gradually corrects the input of each stage by integrating the physical principle to indirectly influence the output of each stage.
Looking forward to your reply!
The default size of the image generated by running test.py is 640640. The size of the image I need to generate is 12001200. What code do I need to change?
Excellent work!
There are two main questions for me after reading the paper:
Looking forward to your reply. Thanks!
Hello author, why is the code provided different from that in the paper
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.