A small toolkit for image enhancement and quality assessment
Project description
功能
- 图像分区频闪与HDR增强
- 图像质量评估
开放接口参数使用代码示例
- 输入参数:1.模型路径、2.包含图像信息的字典
import json
from ImageEnhancdQualityAccess import IQAEnhanceImage
Json_path = r"/home/y05281/EIQA/test/test.json"
with open(Json_path, "r") as f:
context = json.load(f)
IQAEnImgModel = IQAEnhanceImage(r"/home/y05281/DP-IQA-main/trained_models/student_model.onnx")
Ltp = IQAEnImgModel.IQAEnImg(context)
PC端图像命名&&输入Json设计与输出
=================================================================================
图像命名规则
- 频闪图像命名规则&&示例:expose_time_2500_Number_of_strobes_1000_Fusion_Model_0_imestamp_20240718192828
- expose_time_2500 表示曝光时长是2500
- Number_of_strobes_1000 表示代表亮灯的位置(四位01编码,按位置一次代表上下左右四个频闪灯,0000代表融合后生成图)
- Fusion_Model_代表融合方式1-8代表频闪融合,编号9+0101代表HDR,其中0101编码代表曝光时间由低到高的图像选择,0代表不选,1代表选取,高阶融合初版不涉及编号10,0代表无融合
- 原图应该有时间戳,非原图时间戳随意等长字符代替
- 示例:
- path0="expose_time_2500_Number_of_strobes_1111_Fusion_Model_0_imestamp_20240718192828"
- path8="expose_time_2800_Number_of_strobes_0000_Fusion_Model_9110_imestamp_20240718192828"
- 注意:HDR是4频闪同时亮,代表频闪的字段为Number_of_strobes_1111
输入Json结构
- Json关键字与内容注释
- 关键字 "Model",值字典{关键字"PartNStore"、"HDR"与"IQA",类型bool分别代表是否使用分区频闪融合算法、HDR融合算法以及图像评估机制}
- 关键字 "PartNStoreList",值字典{关键字"曝光时长(真实)"",类型List[str] -> 字符串列表代表该曝光时长下采集频闪图路径}
- 关键字 "HDR",值列表,列表内是有序元组Tuple[str,str] -> 第一个字符串代表曝光时长,第二个代表图像路径,有序指的是以元组曝光时长元素由小到大排序 ~~ - 关键字 "GrayRGB",值字典{关键字"Gray"与"RGB",类型bool分别代表是否使用灰图与采图} ~~
- 示例
PathList = [path0,path1,path2,path3]
path = path8
Json = {
"Model":{
"PartNStore":True, #是否使用了分区频闪模式
"HDR":False, #是否使用了HDR模式
"IQA":False,#是否使用评估机制
},
~~ "GrayRGB":{ ~~
~~ "Gray":False, #图像是灰度图 ~~
~~ "RGB":True, #图像是彩 ~~
~~ }, ~~
"PartNStoreList":{
"2500(expose_time)":PathList, #结构曝光时间:该曝光下的采图路径列表
"2600(expose_time)":PathList,
"2700(expose_time)":PathList,
"2800(expose_time)":PathList
},
"HDRList":[
("2500(expose_time)",path), #结构曝光时间:该曝光下的采图路径
("2600(expose_time)",path),
("2700(expose_time)",path),
("2800(expose_time)",path),
("2900(expose_time)",path),
]
}
========================================================================================================
PC端输出设计
- 返回有序元组列表 List[Tuple(score,str)] -> 一个元组列表串列表,元组内容是图像得分和图像路径字符串,列表有序指列表按降得分排序
- IQA -> True, List[str] -> 一个有序字符串列表,字符串是图像路径,有序指的是列表左到右字符串对应的图像得分一次降低,list[0]>=list[-1]
- IQA -> False, List[str] -> 一个字符串列表,字符串是图像路径
许可证
代码库使用GNU General Public License v3 (GPLv3)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eiqa-0.0.4.tar.gz
(23.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
EIQA-0.0.4-py3-none-any.whl
(23.0 kB
view details)
File details
Details for the file eiqa-0.0.4.tar.gz.
File metadata
- Download URL: eiqa-0.0.4.tar.gz
- Upload date:
- Size: 23.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
245c2e9eac17290e7217893e40a5a674234b3e1e0289f7871334e4aa42c9cf10
|
|
| MD5 |
8753506925a3bccf80d060efff4d3114
|
|
| BLAKE2b-256 |
8a6494816d909d87e7e0373c566374f32ea4e70b909d00ae8c7116931be57fce
|
File details
Details for the file EIQA-0.0.4-py3-none-any.whl.
File metadata
- Download URL: EIQA-0.0.4-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a603123feb9f9233b37565640f3ec9563285f966f1c20046e984d32030da6511
|
|
| MD5 |
ce07fa9450baffa68bd27ec394e6e8b4
|
|
| BLAKE2b-256 |
22440496451cdcf8d6c0f3fe68071f42c3e02387f673f342af06692c28ab46d3
|