【训练源码】
https://github.com/JianghaiSCU/Diffusion-Low-Light
【参考源码】
https://github.com/hpc203/Diffusion-Low-Light-onnxrun
【论文地址】
https://arxiv.org/pdf/2306.00306.pdf
【算法原理图】
【效果展示】
【测试环境】
vs2019
netframework4.7.2
opencvsharp==4.8.0
onnxruntime==1.16.2
【部分实现代码】
using System;
using System.Diagnostics;
using System.Windows.Forms;
using OpenCvSharp;namespace FIRC
{public partial class Form1 : Form{Mat src = null;DLLManager dm = new DLLManager();public Form1(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){OpenFileDialog openFileDialog = new OpenFileDialog();openFileDialog.Filter = "图文件(*.*)|*.jpg;*.png;*.jpeg;*.bmp";openFileDialog.RestoreDirectory = true;openFileDialog.Multiselect = false;if (openFileDialog.ShowDialog() == DialogResult.OK){src = Cv2.ImRead(openFileDialog.FileName);pictureBox1.Image = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(src);}}private void button2_Click(object sender, EventArgs e){if(pictureBox1.Image==null){return;}var resultImg = dm.Inference(src);pictureBox2.Image= OpenCvSharp.Extensions.BitmapConverter.ToBitmap(resultImg);}private void Form1_Load(object sender, EventArgs e){dm.LoadWeights(Application.StartupPath+ "\\weights\\diffusion_low_light_1x3x192x320.onnx");}private void button3_Click(object sender, EventArgs e){VideoCapture capture = new VideoCapture(0);if (!capture.IsOpened()){Console.WriteLine("video not open!");return;}Mat frame = new Mat();var sw = new Stopwatch();int fps = 0;while (true){capture.Read(frame);if (frame.Empty()){Console.WriteLine("data is empty!");break;}sw.Start();var resultImg = dm.Inference(frame);sw.Stop();fps = Convert.ToInt32(1 / sw.Elapsed.TotalSeconds);sw.Reset();Cv2.PutText(resultImg, "FPS=" + fps, new OpenCvSharp.Point(30, 30), HersheyFonts.HersheyComplex, 1.0, new Scalar(255, 0, 0), 3);//显示结果Cv2.ImShow("Result", resultImg);int key = Cv2.WaitKey(10);if (key == 27)break;}capture.Release();}}
}
【视频演示】
C#winform基于opencvsharp结合Diffusion-Low-Light算法实现低光图像增强黑暗图片变亮变清晰_哔哩哔哩_bilibili【测试环境】vs2019netframework4.7.2opencvsharp==4.8.0onnxruntime==1.16.2更多信息参考:https://blog.csdn.net/FL1623863129/article/details/141280921, 视频播放量 1、弹幕量 0、点赞数 0、投硬币枚数 0、收藏人数 0、转发人数 0, 视频作者 未来自主研究中心, 作者简介 未来自主研究中心,相关视频:AI视频换脸真的快变态死了!!!,火了 !全网首个秋叶aaaki【SDV4.9超强版本炸裂更新】感谢秋枼大佬的SDV4.9整合包+sd教程超强模型插件,【可灵AI】无头人女明星,C#调用yolov7进行目标检测winform开发,YOLOv8检测界面-PyQt5实现,渐冻症患者利用脑机接口"说话",全家人泪流满面,马斯克发布了一条AI生成的视频,C# winform使用onnxruntime部署LYT-Net轻量级低光图像增强算法,C#实现全网yolov7目前最快winform目标检测,C#使用纯OpenCvSharp部署yolov8-pose姿态识别https://www.bilibili.com/video/BV1RZpRewE96/
【源码下载地址】
https://download.csdn.net/download/FL1623863129/89647108