Skip to main content

A small toolkit for image enhancement and quality assessment

Project description

功能

  1. 图像分区频闪与HDR增强
  2. 图像质量评估

开放接口参数使用代码示例

  1. 输入参数: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设计与输出

=================================================================================

图像命名规则

  1. 频闪图像命名规则&&示例:expose_time_2500_Number_of_strobes_1000_Fusion_Model_0_imestamp_20240718192828
    1. expose_time_2500 表示曝光时长是2500
    2. Number_of_strobes_1000 表示代表亮灯的位置(四位01编码,按位置一次代表上下左右四个频闪灯,0000代表融合后生成图)
    3. Fusion_Model_代表融合方式1-8代表频闪融合,编号9+0101代表HDR,其中0101编码代表曝光时间由低到高的图像选择,0代表不选,1代表选取,高阶融合初版不涉及编号10,0代表无融合
    4. 原图应该有时间戳,非原图时间戳随意等长字符代替
    5. 示例:
    • 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结构

  1. Json关键字与内容注释
    • 关键字 "Model",值字典{关键字"PartNStore"、"HDR"与"IQA",类型bool分别代表是否使用分区频闪融合算法、HDR融合算法以及图像评估机制}
    • 关键字 "PartNStoreList",值字典{关键字"曝光时长(真实)"",类型List[str] -> 字符串列表代表该曝光时长下采集频闪图路径}
    • 关键字 "HDR",值列表,列表内是有序元组Tuple[str,str] -> 第一个字符串代表曝光时长,第二个代表图像路径,有序指的是以元组曝光时长元素由小到大排序 ~~ - 关键字 "GrayRGB",值字典{关键字"Gray"与"RGB",类型bool分别代表是否使用灰图与采图} ~~
  2. 示例
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


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.2.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

EIQA-0.0.2-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file eiqa-0.0.2.tar.gz.

File metadata

  • Download URL: eiqa-0.0.2.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.16

File hashes

Hashes for eiqa-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5a181cba511bf3c6dc27f809f6f317959427228237c43e14aa4913de578f0b14
MD5 172fa0819db8a7a4bf3c0ec3088b27d1
BLAKE2b-256 79c6ce604c64a208bf92f304b2f09c3a47d2e4be23c3031297702ae71e0f3213

See more details on using hashes here.

File details

Details for the file EIQA-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: EIQA-0.0.2-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

Hashes for EIQA-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 49f1ed0e1948ab56c77910d9910aa61a7af3edf78b559bbbb5061a5a44bcfb31
MD5 4cde988f45e48c545f14e0a9b8d04671
BLAKE2b-256 3e281b30e0c72dec7da3dbc1fb91cd3e60cd6758f5c85ffc0e2f01c34a7d565e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page