FOMO - Lightweight Point Localization models.
Project description
FOMO: Fast Object Localization
FOMO is a lightweight point localization model designed for edge AI applications. Instead of regressing bounding boxes, FOMO downsamples the input image (for example, mapping a 192x192 input to a 24x24 grid) and predicts class probabilities and coordinates on a per-cell basis.
Installation
Install the package via PyPI:
pip install fomo-edge-ai
Usage
# Model
from fomo import FOMO
model = FOMO(model_path=None, size="s", nb_classes=1, device="cpu")
# Training
results = model.train(
allow_experimental=True,
data=str(data_yaml_path), # YOLO style data.yaml
# Only bounding-box style datasets supported.
# TODO: add support for point-level annotation datasets
epochs=EPOCHS,
batch=BATCH,
lr0=3e-4,
eval_interval=1,
workers=2,
device=device,
project=PROJECT,
name=RUN_NAME,
exist_ok=True,
patience=0,
)
# Export as TFLite model
fp32_path = trained.export(output_path=str(weights_dir / f"{RUN_NAME}_fp32.tflite"))
# INT8 Quantization
int8_path = quantizer.quantize(
fp32_tflite=fp32_path,
calibration_data=calib_iter,
config=config,
output_path=str(weights_dir / f"{RUN_NAME}_int8.tflite")
)
Model Hosting
Models are currently available on Hugging Face:
https://huggingface.co/fomo-edge-ai/FOMO
Examples
Refer to examples/ for detailed examples on training and inference.
Tests
Tests are completed using modal. Install the modal cli and run
make test
License
Code is licensed under the Apache License 2.0. Pre-trained weights are hosted externally and may inherit separate licensing terms. Check details in the specific weight repositories.
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
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 fomo_edge_ai-0.0.12.tar.gz.
File metadata
- Download URL: fomo_edge_ai-0.0.12.tar.gz
- Upload date:
- Size: 135.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90cfd9ced764c4aede617398862bd20d12be54bfd97fb9e834efa617dee62aad
|
|
| MD5 |
990b2bcbe9b10ece85c01dca4a09686e
|
|
| BLAKE2b-256 |
37bba97edf50ea13863908d871e293fb60588d566dcba7938e25991e560164e9
|
File details
Details for the file fomo_edge_ai-0.0.12-py3-none-any.whl.
File metadata
- Download URL: fomo_edge_ai-0.0.12-py3-none-any.whl
- Upload date:
- Size: 153.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
440cd5404b3e0722d1dd25fad78ca591fcbf834d4dc5baad981173c77071cb22
|
|
| MD5 |
7d5bbd129df580b2fbb06cccf523b074
|
|
| BLAKE2b-256 |
b82dc6a7eca56c255d6b9eec67795b4b45bace36a1a167818703a3a0b5f66e09
|