A comprehensive OCR and computer vision model library with support for SVTRV2, YOLO, EfficientNet, PPLCNet, and more.
Project description
MemoLib
A computer vision model library built on PyTorch, providing a unified interface for object detection, image segmentation, image classification, text recognition, and anomaly detection.
Model Status
| Category | Model | Status |
|---|---|---|
| Detection | YOLOv5, YOLOv8, YOLO11, YOLO26 | Stable |
| Detection | RF-DETR | ⚠ Not fully tested |
| Segmentation | YOLO Segment (v8, 11, 26) | Stable |
| Segmentation | DINO UperNet | ⚠ Not fully tested |
| Classification | PPLCNet (x0.25 – x1.0) | Stable |
| Classification | YOLO Classification (v8, 11, 26) | Stable |
| Classification | EfficientNet (B0–B7, V2S/M/L/XL) | ⚠ Not fully tested |
| Recognition | SVTR2 | 🔧 Ongoing |
| Anomaly Detection | Dinomaly2 | 🔧 Ongoing |
| Anomaly Detection | INP Former | 🔧 Ongoing |
Unified Interface
All models share a consistent API:
model.LoadWeight(path) # Load pretrained or custom weights
model.Train(callbacks) # Start training
model.Predict(image) # Single inference
model.BatchPredict(images) # Batch inference
model.Export(path, format) # Export to ONNX / OpenVINO / TensorRT
model.StopTraining() # Stop training gracefully
Installation
pip install memolib
Optional dependencies
# For YOLO models
pip install memolib[yolo]
# For PPLCNet models
pip install memolib[pplcnet]
# For development
pip install memolib[dev]
Quick Start
Object Detection — YOLO
from MemoLib.Model.YOLO import Yolo
from MemoLib.Model.BaseModel.eDetectionModel import eYoloDetectionModel
model = Yolo()
model.cfg.Architecture = eYoloDetectionModel.Yolo11n
model.cfg.DatasetPath = "path/to/dataset"
model.Train(callbacks=lambda level, msg: print(f"[{level}] {msg}"))
Classification — PPLCNet
from MemoLib.Model.PPLCNet import PPLCNet
from MemoLib.Model.BaseModel.eClassificationModel import ePPLCNetModel
model = PPLCNet()
model.cfg.Architecture = ePPLCNetModel.PPLCNetx50
model.cfg.DatasetPath = "path/to/dataset"
model.Train()
Model Export
from MemoLib.Model.BaseModel.eModelBase import eModelExportType
model.Export("weights/best.pt", eModelExportType.ONNX)
model.Export("weights/best.pt", eModelExportType.OpenVINO)
model.Export("weights/best.pt", eModelExportType.TensorRT)
Project Structure
MemoLib/
└── Model/
├── BaseModel/ # Abstract interface (IModel), enums, export types
├── YOLO/ # YOLO detection, segmentation, classification
├── RFDETR/ # RF-DETR detection [not fully tested]
├── DinoUperNet/ # DINO + UperNet semantic segmentation [not fully tested]
├── Efficientnet/ # EfficientNet classification [not fully tested]
├── PPLCNet/ # PPLCNet lightweight classification
├── SVTRV2/ # SVTR2 text recognition [ongoing]
└── Anomaly/ # Dinomaly2, INP Former [ongoing]
Requirements
- Python 3.9+
- PyTorch 2.x (CUDA 12.x recommended)
- See
requirements.txtfor full dependency list
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file memolib-1.1.22.tar.gz.
File metadata
- Download URL: memolib-1.1.22.tar.gz
- Upload date:
- Size: 68.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e49f44cd3ed8e2f2effe2abb5bb8e6183539b5ea457be6484ad80e9c29592f1e
|
|
| MD5 |
4cab26423f2205e6ed2dd85942027f90
|
|
| BLAKE2b-256 |
1afc7c00a27465754cb27091a17b7cf5a0c73db1568bd1ca2263fe6b8ac740f2
|
File details
Details for the file memolib-1.1.22-py3-none-any.whl.
File metadata
- Download URL: memolib-1.1.22-py3-none-any.whl
- Upload date:
- Size: 80.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9786917c232d6c83f0148a03ddb152ca16613dda76e05629ef73dfec2381089
|
|
| MD5 |
5a28e82a76f9cfcfeea675fe123538d6
|
|
| BLAKE2b-256 |
145662ee844b15ab940db68452f44c54eb690f4f6b6b8df8b179f3038113f913
|