KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
pepedpid
★ 9
Open GitHub ↗
No description available.
Download README (.md)
Explore Similar Repositories
Neuron-Companion
:
No description available.
PLE_Economic_Agency_Index
:
Public heatmap of US per county EAI (Economic Agency Index
VideoCall-System
:
No description available.
a2a-template-langgraph
:
A production-ready agent server built with LangGraph that implements the Agent-to-Agent (A2A) protocol
sigma_connect_ha
:
Provides real-time status updates, sensor info, and alarm control via local network connection to Sigma Ixion alarm systems.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
pepedpid
?
Download (.md)
# 🌀 pepedpid **pepedpid** is a Rust implementation of Rapid, Detail-Preserving Image Downscaling (DPID), designed to be used as a Python library via rust-py bindings. It combines high performance with ease of use in Python projects, such as machine learning pipelines or image processing tasks. # 🚀 Quick Start Installation: ```bash pip install pepeline pepedpid ``` Usage example: ```py from pepeline import read, save, ImgFormat from pepedpid import dpid_resize,cubic_resize # Load an image in f32 format (normalized [0,1]) img = read("test.png", format=ImgFormat.F32) # Apply DPID resizing img_dpid = dpid_resize(img, 512, 512, 0.5) img_matlab_bicubic = cubic_resize(img,512,512) # Save the result save(img_dpid, "img_dpid.png") save(img_matlab_bicubic, "img_matlab_bicubic.png") ``` # ⚙️ Arguments for `dpid_resize` ```py dpid_resize(input: np.ndarray, h: int, w: int, l: float) -> np.ndarray ``` ## Parameters: - `input` (`np.ndarray`) — input image of type `float32`, normalized in the range [0.0, 1.0]. Expected shape: `(H, W, C)`, where `C = 1` (grayscale) or `3` (RGB). - `h` (`int`) — target height of the image. - `w` (`int`) — target width of the image. - `l` (`float`) — the λ coefficient, controlling the trade-off between smoothing and detail preservation: - `λ ≈ 0.0` — maximum smoothing, the image will be soft. - `λ ≈ 1.0` — maximum detail preservation, resulting in a sharp image. - **Recommended value**: `0.5` — balance between smoothness and sharpness. ## Returns: - `np.ndarray` — the downscaled image (`float32`, range [0.0, 1.0], shape `(h, w, C)`).