Netra: Digital Eye for Image Processing
Netra (Sanskrit/Javanese: "Eye") is a modern Python library designed to simplify image processing and computer vision. Inspired by the philosophy of Saka-NLP, Netra serves as a clean, modular, and high-performance visual infrastructure pillar.
✨ Key Features
- Clean API (Façade Pattern): Access all advanced features through a single
Netraclass. - Intelligent Auto-Correction: Automatically straightens skewed images with
auto_rotate. - One-Line Preprocessing: Clean images for OCR or Deep Learning in a single line.
- Smart Resizing: Resize images without breaking the aspect ratio.
- Data Augmentation: Includes noise injection and lighting simulation for AI datasets.
- Computer Vision Plugins: Built-in support for face detection, shape detection, and color isolation.
- Lightweight Algorithms: Includes Pencil Sketch, Cartoon, Sepia, and Contrast Enhancement.
🚀 Installation Guide
Ensure you have Python 3.8 or newer.
pip install netra-cv
For installation from source (development version):
git clone https://github.com/Muhammad-Ikhwan-Fathulloh/Netra-CV.git
cd Netra-CV
pip install -e .
📖 Usage Examples
Netra is designed to keep your code clean and readable.
1. Basics & Preprocessing
from netra import Netra
# Load image
img = Netra.load("photo.jpg")
# Clean image (Grayscale -> Blur -> Otsu Threshold)
cleaned = Netra.clean_image(img)
# Automatically straighten image skew
straightened = Netra.auto_rotate(img)
2. Geometric Manipulation
# Smart resize (preserving aspect ratio)
resized = Netra.smart_resize(img, width=800)
# Center crop for AI model input (TensorFlow/PyTorch)
cropped = Netra.center_crop(img, size=(224, 224))
# Flip/Mirror (horizontal, vertical, both)
mirrored = Netra.flip(img, mode="horizontal")
3. Effects & Enhancement (Lightweight Algorithms)
# Intelligent contrast enhancement (CLAHE)
enhanced = Netra.enhance_contrast(img)
# Vintage Sepia Filter
sepia = Netra.to_sepia(img)
# Pencil Sketch Effect
sketch = Netra.to_sketch(img)
# Cartoon Effect
cartoon = Netra.to_cartoon(img)
4. Color & Shape Vision
# Isolate specific colors (green, blue, red, yellow)
only_green = Netra.isolate_color(img, "green")
# Detect shapes (Triangle, Square, Circle)
shapes = Netra.find_shapes(img)
# Add Text Watermark
marked = Netra.watermark(img, "NETRA-CV", position=(50, 50))
🛠️ Command Line Interface (CLI)
Netra can also be used directly from the Command Line:
# View help
netra --help
# Get image info
netra --info sample.jpg
# Sketch conversion
netra --sketch photo.jpg --output result_sketch.jpg
# Quick resize
netra --resize sample.jpg --width 1024 --output resized.jpg
❤️ Credits & Contributors
- Lead Architect: Muhammad Ikhwan Fathulloh
- Open-source licensed under MIT License.
"Netra provides eyes to your code."
Metadata
Release files for netra-cv 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| netra_cv-0.1.0.tar.gz | 13.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| netra_cv-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.7 kB
Release files / netra_cv-0.1.0.tar.gz
| Download URL | netra_cv-0.1.0.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9362f687e81047d4f572a89eb47aefac58ce718f186d38a080d5b5ded951278
|
|
BLAKE2b-256 checksum How to use checksums |
4766775469faf05807d1f07db6b6aa91c0aab4e16ef0bbfa53ab16a966a2af08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Release files / netra_cv-0.1.0-py3-none-any.whl
| Download URL | netra_cv-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f55d7e9cb86013a0a67e29386df9301b69f348b346bc656c912a241d560163a1
|
|
BLAKE2b-256 checksum How to use checksums |
cedc43f485cfe909c98f0a8a865e89923eb4b3132aa864927e24098c063d0d94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Security for netra-cv 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.