Skip to main content

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

fomo_edge_ai-0.0.11.tar.gz (135.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fomo_edge_ai-0.0.11-py3-none-any.whl (153.2 kB view details)

Uploaded Python 3

File details

Details for the file fomo_edge_ai-0.0.11.tar.gz.

File metadata

  • Download URL: fomo_edge_ai-0.0.11.tar.gz
  • Upload date:
  • Size: 135.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for fomo_edge_ai-0.0.11.tar.gz
Algorithm Hash digest
SHA256 ad78898d3384f638d2de169e3375dccc83c7386ed9e141c1434c94690448c94b
MD5 3943237010694bd3dd7e959cddc6cea4
BLAKE2b-256 4befe147ccbb0dbcbb3eefb517e24173872744ae65cb4b74694f5802c6eca3f4

See more details on using hashes here.

File details

Details for the file fomo_edge_ai-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: fomo_edge_ai-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 153.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for fomo_edge_ai-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 a585975a8cd1d48dab40fb16503e29ebc1e88107035c550edd8ec994d80c239e
MD5 c5e674952c8a2db474968b6c8dfd5edd
BLAKE2b-256 6832b3ac7cffa910d258860f53f4752b9b927c6113594e9aa11ca6ab282057bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page