Skip to main content

A Python package to generate heatmaps from deep learning models.

Project description

自动提取神经网络的中间层特征 并生成热力图 支持 GPU 加速(可选) 支持 .mat 格式(用于进一步分析) 支持 .png 输出(用于可视化) 可直接 import 在 Python 代码或 Jupyter Notebook 里使用

pip install heatmap_generator

快速开始 from heatmap_generator import HeatmapGenerator

初始化热力图生成器(加载模型)

heatmap_gen = HeatmapGenerator(model_name="rpcanetma9",model_path="/Users/yourname/My_mission/API/RPCANet_Code/heatmap_package/heatmap_generator/result/20240519T07-24-39_rpcanetma9_nudt/best.pkl", use_cuda=True)

生成热力图,保存为 .mat 和 .png

heatmap = heatmap_gen.generate_heatmap( img_path="/Users/yourname/My_mission/API/RPCANet_Code/datasets/NUDT-SIRST/test/images/001101.png", data_name="NUDT-SIRST_test_images_001101", output_mat="/Users/yourname/My_mission/API/RPCANet_Code/heatmap_test_2.20/mat", output_png="/Users/yourname/My_mission/API/RPCANet_Code/heatmap_test_2.20/png" )

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

heatmap_generator-0.1.1.tar.gz (33.3 kB view details)

Uploaded Source

Built Distribution

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

heatmap_generator-0.1.1-py3-none-any.whl (37.7 kB view details)

Uploaded Python 3

File details

Details for the file heatmap_generator-0.1.1.tar.gz.

File metadata

  • Download URL: heatmap_generator-0.1.1.tar.gz
  • Upload date:
  • Size: 33.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for heatmap_generator-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d79038d5899a2910831878f9983d2f75946a18057dc4077a8e22cfe357c59c49
MD5 3aea7a44c27ef96caaa2b6428c6a219e
BLAKE2b-256 724f9c2328c18b1ab82a108fa2b4ada4940ebc47e21e67c8b24ce29c07798c3a

See more details on using hashes here.

File details

Details for the file heatmap_generator-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for heatmap_generator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 45534f66c03ac4cbc5194feb5cd538f1d122d0496efe85cf2474a67701b50380
MD5 ec256cfa0f8aab353d4d51aa9356c2eb
BLAKE2b-256 1fc10862374545943b594c3b43510ec93ba70c20eed1b0e98fca428b39355478

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