https://github.com/songyz2019/hsi-preprocessing-toolkit
A Hyperspectral Image Preprocessing Toolkit from HSI Camera to Machine Learning Dataset
https://github.com/songyz2019/hsi-preprocessing-toolkit
data-science data-visualization gradio hyperspectral image-processing preprocessing
Last synced: about 1 month ago
JSON representation
A Hyperspectral Image Preprocessing Toolkit from HSI Camera to Machine Learning Dataset
- Host: GitHub
- URL: https://github.com/songyz2019/hsi-preprocessing-toolkit
- Owner: songyz2019
- License: agpl-3.0
- Created: 2025-06-04T12:30:04.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2026-01-23T08:12:32.000Z (3 months ago)
- Last Synced: 2026-02-25T20:35:48.785Z (about 2 months ago)
- Topics: data-science, data-visualization, gradio, hyperspectral, image-processing, preprocessing
- Language: Python
- Homepage:
- Size: 18.7 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# HSI Preprocessing Toolkit
[](https://pypi.org/project/hsi-preprocessing-toolkit)
[](https://pypi.org/project/hsi-preprocessing-toolkit)
[](https://pypi.org/project/hsi-preprocessing-toolkit)



HSI Preprocessing Toolkit (HPT, formerly HDR2MAT) is a hyperspectral image preprocessing toolset that:
1. Read the raw data directly from HSI cameras, and convert it into `.mat` file
2. Read the `.mat` file
3. Preview HSI and convert it to RGB `.png` file
4. Crop, rotate, transform the HSI and preview in realtime
5. Select spectrals of interest visually and save them into a `.mat` file
6. Mix multiple HSI images with layers.
7. Generate Spectral Profiles for visualization.
8. Some other utils
## Installation
### Prerequisites
1. A Chromium-based browser
2. A modern OS
### Manual
1. Download [hpt.cmd](https://github.com/songyz2019/hsi-preprocessing-toolkit/blob/main/script/hpt.cmd) from GitHub release
2. Double click the `hpt.cmd` file.
> **TIPS**: Make sure you have internet access during the first start
### Install with uv
1. Install [uv](https://docs.astral.sh/uv/) directly or with pip: `pip install uv`
2. Install HPT: `uv tool install hsi-preprocessing-toolkit`
3. Start HPT: `hsi_preprocessing_toolkit`
### Install with pip
1. Install HPT: `pip install hsi-preprocessing-toolkit`
2. Start HPT: `hsi_preprocessing_toolkit`
> **TIPS**: It's not recommend to install CLI tools directly with pip, please use [uv tool](https://docs.astral.sh/uv/guides/tools/) or [pipx](https://pipx.pypa.io/) to install python applications in isolated environments.
## Usage
See help by running:
```sh
hsi_preprocessing_toolkit --help
```
## FAQ
> Q: How is AI utilized in the codebase?
> A: We only use AI as a chatbot. We have reviewed every line of code word-for-word, and 99% of he codebase is written by human directly.
> Q: Is there any security protection?
> A: We implement baseline security practices on a best-effort basis. This includes the use of security tokens for authentication and a principle of least privilege (PoLP) design to minimize potential risks.
## Contributions
We welcome all contributions. For obtaining, providing feedback and contributing to this project, follow the common practice and [GitHub Docs](https://docs.github.com/).
## Credit
1. [uv](https://docs.astral.sh/uv/) for providing a new reliable solution for Python application distribution.
2. `gradio` for modern Python Data Science UI
3. `rasterio` for remote sensing data reading
4. `scipy`, `numpy`, `matplotlib` and `einops`
5. For more projects, see `pyproject.toml`
## License
```text
Copyright (C) 2025 songyz2019
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
```