Skip to main content

A small example package of demosaic-raw and cvisp, for our team

Project description

""" This is a demo for cvisp, 开发板、相机等拍摄设备取到的RAW with metadata,可以直接用该工具包进行demosaic,得到RGB图像,以便于展示。 - pip install cvisp - from cvisp.utils import Demosaic_RAW

"""

""" 三种模式,分别为:预览raw图,推理GDIP,预览demosaic(自用) run_demosaic(): return the demosaiced image, (HWC, u16, bmp) run_isp_with_meta(): return the rgb image , (HWC, u8, bmp) run_model(weight_path = './your.pt', model = GDIP(), device = 'cuda:0'): return the output of your model, (HWC, u8, bmp)

完整传参说明:
- Demosaic_RAW(mode : str = None, input_data_path : str = None, show_meta_data : bool = True, 
show_image : bool = False, save_image : bool = True, result_output_dir : str = None):
    mode: defatult = 'simple_dm', choices = ['simple_dm', 'opencv_dm']
    input_data_path: raw图片路径,支持单张图片,如:'./test.dng'
    show_meta_data: show the meta data of the input data, default = True,你可以选择是否展示meta data
    show_image: show the output image, default = False,你可以选择是否展示输出图像
    save_image: save the output image, default = True,你可以选择是否保存输出图像,保存路径为result_output_dir
    result_output_dir: the output dir of the result image, default = './demosaic/',你可以选择保存路径

"""

if name == 'main': for im in glob.glob(image_path_list + '*.dng'): demosaicd_raw = Demosaic_RAW(input_data_path = im).run_model(weight_path = './your.pt', model = GDIP(), device = 'cuda:0') # rgb = Demosaic_RAW(input_data_path = im).run_isp_with_meta() # gdip_out = Demosaic_RAW(input_data_path = im).run_model(weight_path = './your.pt', model = GDIP(), device = 'cuda:0')

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

cvisp-0.1.3.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

cvisp-0.1.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file cvisp-0.1.3.tar.gz.

File metadata

  • Download URL: cvisp-0.1.3.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for cvisp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 63be68f1b924d67b806d6daa5c64cbf1dfcf01646ad7a8e4c7490e0f4af67a04
MD5 dc9cc06bd73a5fcea46ed190469f4574
BLAKE2b-256 f9b9abe2143bc9c32111aabbc25314057c5645e422b87afbd3e33922b9c3c2c4

See more details on using hashes here.

File details

Details for the file cvisp-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: cvisp-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for cvisp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f514131d390499d01b827854980d0058e6b86a62f3813bf2029627c52c77b488
MD5 16ae2a613239ef2370567403545ee53a
BLAKE2b-256 77b276fd96f10c03be59f67da5eec2cbc22bd780bb0dda1c84dfbde950ed744a

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