Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
57ae143
rename things
CuriousDolphin Apr 17, 2025
b77b60a
rename ModelInfo to Remote ModelInfo
CuriousDolphin Apr 17, 2025
92cb1ce
refactor scaffolding
CuriousDolphin Apr 17, 2025
1bfdeef
update dependencies and refactor
CuriousDolphin Apr 17, 2025
130021b
feat: add nn models support
CuriousDolphin Apr 18, 2025
987a6e6
clean logs
CuriousDolphin Apr 18, 2025
c900487
feat: introduce AutoBackbone for automatic backbone management and re…
fcdl94 Apr 22, 2025
a044ec9
feat: refactor AutoModel registration and enhance RTDetr model support
fcdl94 Apr 22, 2025
8aaed23
feat: added model wrapper for high-level API
fcdl94 Apr 22, 2025
b89dfb1
feat: enhance registry management - now registry is a collection of j…
fcdl94 Apr 22, 2025
e914882
feat: update model registry structure and enhance model info handling
CuriousDolphin Apr 28, 2025
bfe4922
refactor logging and scaffolding
CuriousDolphin Apr 28, 2025
b8286ce
refactor names
CuriousDolphin Apr 28, 2025
6b8785d
feat: refactor model output structure and enhance logging
CuriousDolphin Apr 28, 2025
cb2609c
feat: introduce kwargs in model config
fcdl94 Apr 28, 2025
f782e7a
wip: backbones
fcdl94 Apr 28, 2025
ea51c0e
feat: enhance backbone support and add DarkNet implementation
fcdl94 Apr 29, 2025
62aef9d
lint
CuriousDolphin Apr 29, 2025
4923b0b
feat: add classification dataset support and enhance model architecture
fcdl94 Apr 29, 2025
7530c5b
feat: add classification support and evaluation metrics
fcdl94 Apr 29, 2025
89784c2
feat: refactor logs management
CuriousDolphin Apr 30, 2025
909d6f0
feat: update ROOT_DIR structure and add experiments directory
CuriousDolphin Apr 30, 2025
aad00a0
feat: refactor directory structure and update dataset handling
CuriousDolphin Apr 30, 2025
e62cb9a
fix: remove unused image file
CuriousDolphin Apr 30, 2025
47c95df
feat: enhance RemoteDataset properties and improve file download hand…
CuriousDolphin Apr 30, 2025
234b3bd
feat: enhance DictClass with pickling support and refactor ModelInfo
CuriousDolphin Apr 30, 2025
62b6c56
fix multi gpu training and logging
CuriousDolphin Apr 30, 2025
49082ba
feat: adding maskformer model
fcdl94 May 2, 2025
f5169a8
feat: fix m2f postprocessing, fix encoder fpn, and add new coco model
fcdl94 May 2, 2025
d4c2ee3
feat: refine postprocessing type handling and add image interpolation…
fcdl94 May 5, 2025
f1a71b6
feat: enhance get_system_info, replace collect_env and add focoos_ver…
CuriousDolphin May 5, 2025
ce6889d
feat: update ONNX and Torchscript runtimes to use model_info for dyna…
CuriousDolphin May 5, 2025
714c795
feat: remove remote train
CuriousDolphin May 5, 2025
4951a31
wip hub integration
CuriousDolphin May 5, 2025
e92673c
feat: load pretrained weights from remote url
CuriousDolphin May 7, 2025
001a41a
feat: update model configurations and enhance post-processing methods
fcdl94 May 7, 2025
c16741a
refactor: standardize post-processing method names across the codebase
fcdl94 May 7, 2025
9ec8271
feat: add fai-detr-n-coco model configuration and update model registry
CuriousDolphin May 7, 2025
ff2148d
feat: enhance model post-processing by adding class_names parameter
fcdl94 May 7, 2025
997510b
feat: enhance visualization hook with mosaic
CuriousDolphin May 7, 2025
5efb80b
Merge remote-tracking branch 'refs/remotes/origin/feat/opensource-mod…
CuriousDolphin May 7, 2025
4b9492e
feat: add BisenetFormer model configuration and integrate into model …
fcdl94 May 7, 2025
8ca0839
feat: change family names to be more explicit
fcdl94 May 7, 2025
27e7395
feat: enhance AutoModel with weight loading and add AutoInferModel class
CuriousDolphin May 7, 2025
c1ee5cf
refactor ModelManager
CuriousDolphin May 8, 2025
0d3603b
fix: enhance logging and correct json format in metrics and model_in…
fcdl94 May 8, 2025
311501c
refactor: clean up dependencies, clean up the checkpointer, remove un…
fcdl94 May 9, 2025
d1ef5ff
refactor: update model configurations and enhance checkpoint handling
fcdl94 May 9, 2025
5250253
feat: (wip) add export models and refactor InferModel
CuriousDolphin May 9, 2025
8e6c94c
wip: add export postprocess
CuriousDolphin May 12, 2025
6f75412
feat: add axes names and dynamic axes
CuriousDolphin May 12, 2025
353f4f5
wip
CuriousDolphin May 12, 2025
d0110a9
remove post_processor from baseNNModels
CuriousDolphin May 12, 2025
564aa8c
feat: update inference model and logging enhancements
CuriousDolphin May 12, 2025
59a73ae
feat: update model registry and enhance model management
CuriousDolphin May 13, 2025
1fa3d5d
add torchscript t4 latency metrics
CuriousDolphin May 13, 2025
c7541d7
feat: add latency metrics to pretrained_models
CuriousDolphin May 13, 2025
d77a8da
wip on metrics
CuriousDolphin May 13, 2025
7664200
feat: update validation metrics in model_info.json
CuriousDolphin May 13, 2025
80d7fd1
refactor: streamline model processing
fcdl94 May 13, 2025
fb8564a
wip hub model_sync
CuriousDolphin May 15, 2025
0b09ef5
feat: enhance model_info handling during train
CuriousDolphin May 15, 2025
635fd73
feat: add StatusTransition, add model_info config fn to focoos_model
CuriousDolphin May 15, 2025
81ee0f0
refactor: update Instances class and improve dataset mappers
fcdl94 May 15, 2025
07b1d9a
fix: correct attribute access in ImageList class
fcdl94 May 15, 2025
a501243
feat: update training information handling and sync process
CuriousDolphin May 15, 2025
e931844
refactor: improve ApiClient initialization
giuseppeambrosio97 May 15, 2025
7e61906
misc fixes
CuriousDolphin May 16, 2025
734a592
feat: test for ModelManager
fcdl94 May 16, 2025
9a37353
remove model_ref from pretrained
CuriousDolphin May 16, 2025
287b992
feat: add test for registred models, enable mask scoring and improve …
fcdl94 May 16, 2025
b4b15c3
feat: add training and validation examples for FocoOS framework
fcdl94 May 19, 2025
2584c9a
feat: add RemoteModel to SyncToHub and ConfigManager to InferModel
CuriousDolphin May 19, 2025
8fae0d3
feat: update authorization header in ApiClient to use X-API-Key
giuseppeambrosio97 May 19, 2025
2e9290c
update new model endpoint
CuriousDolphin May 19, 2025
e4d1b76
feat: enhance error handling in RemoteDataset for dataset retrieval
giuseppeambrosio97 May 19, 2025
44dee9c
refactor: streamline model handling in FocoosTrainer and enhance logg…
fcdl94 May 19, 2025
79e1a5a
feat: add package data configuration for model registry and update no…
CuriousDolphin May 20, 2025
c9a22cc
refactor: minor
giuseppeambrosio97 May 20, 2025
bbaac78
refactor: simplify annotation logic in RemoteModel
giuseppeambrosio97 May 20, 2025
0de29f8
wip on model manager get from hub
CuriousDolphin May 20, 2025
b3c2473
fix output_dir
CuriousDolphin May 20, 2025
90cf163
fix: update model status in SyncToHubHook to TRAINING_COMPLETED
giuseppeambrosio97 May 20, 2025
99f46d8
refactor: remove unused parameters and enhance inference functionality
fcdl94 May 20, 2025
db34dfd
feat: catch EarlyStopException
CuriousDolphin May 21, 2025
be1a66a
feat: add new Bisenetformer models and update configuration
fcdl94 May 22, 2025
df5a4a0
feat: enhance benchmarking functionality across models
fcdl94 May 22, 2025
1ece023
feat: add latency benchmarking to export tests
CuriousDolphin May 23, 2025
d5e22b7
feat: enhance ModelManager and related classes for improved model loa…
giuseppeambrosio97 May 23, 2025
6f4cd9f
refactor: update status_transitions type from StatusTransition to dict
giuseppeambrosio97 May 23, 2025
f21f5ca
refactor: remove model_family attribute from FocoosHUB metadata
giuseppeambrosio97 May 23, 2025
561073e
fix visualization
CuriousDolphin May 23, 2025
6be1fbb
add class names to InferModel.infer
CuriousDolphin May 23, 2025
95101f0
enhance model weights loader
CuriousDolphin May 26, 2025
be29305
feat: remove outdated model configurations from the registry
CuriousDolphin May 26, 2025
89e6b43
fix: removes the need of resolution in fai-detr config; restores the …
fcdl94 May 27, 2025
7135ac3
refactor: remove _read_metadata method from InferModel
giuseppeambrosio97 May 27, 2025
255e585
fix: fixes rotation augmentation
fcdl94 May 27, 2025
7ee5e45
refactor: update remote model
fcdl94 May 28, 2025
ed05dc7
feat: restore gradio and update dependencies
CuriousDolphin May 28, 2025
ae55ab7
update ops tests
CuriousDolphin May 28, 2025
badf6dd
build: update test workflow to use pip for dependency installation
CuriousDolphin May 28, 2025
3438f86
add e2e test to CI
CuriousDolphin May 28, 2025
a90db81
Merge branch 'main' into feat/opensource-modelling
CuriousDolphin May 29, 2025
7b1b98b
feat: add converters for dataset processing
fcdl94 May 29, 2025
0b35acd
feat: simplify optional dependencies flow
CuriousDolphin May 29, 2025
bfd268a
Merge branch 'feat/opensource-modelling' of https://github.com/Focoos…
CuriousDolphin May 29, 2025
4887f38
feat: add image annotation functionality to MapDataset and enhance Re…
fcdl94 May 29, 2025
00577ee
feat: update testing and dependency management
CuriousDolphin May 29, 2025
be817e1
fix: reduce number of workers in ops/test_training due to shm error …
CuriousDolphin May 29, 2025
91be8fe
fix some tests
CuriousDolphin May 29, 2025
8cdd6ca
feat: add tutorials and enhance MapDataset and DetectionDatasetMapper…
fcdl94 May 29, 2025
f3fbeb5
feat: update GitHub Actions workflow for model testing
CuriousDolphin May 30, 2025
fba43ac
fix: update Dockerfile and improve model reloading logic
fcdl94 May 30, 2025
93d5db4
fix tests
CuriousDolphin May 30, 2025
d9bfffb
feat: enhance training process and logging in test_training.py
CuriousDolphin May 30, 2025
539f546
fix: update ModelFamily to use str Enum for py3.10 compat
CuriousDolphin May 30, 2025
b2c8308
fix top_k and tests
CuriousDolphin May 30, 2025
12a03e7
fix test (maybe)
CuriousDolphin May 30, 2025
1d38f68
feat: update dependencie
CuriousDolphin May 30, 2025
54402b0
fix: remove test coverage reporting in GitHub Actions
CuriousDolphin May 30, 2025
431e69a
feat: enhance dataset conversion and processing functionality
fcdl94 May 30, 2025
b7d4024
fix: remove unused import in dict_dataset.py
fcdl94 May 30, 2025
ed3f25e
fix: correct bounding box area calculation in get_annotation_dict_fro…
fcdl94 May 30, 2025
07dbfe8
fix: remove NaN from sem segmentation metrics
fcdl94 May 30, 2025
26a0aba
test: ensure directory creation for file downloads in ApiClient
giuseppeambrosio97 Jun 1, 2025
9b7335f
refactor: delete notebooks folder
giuseppeambrosio97 Jun 3, 2025
1322893
feat: update gradio with video inference
CuriousDolphin Jun 3, 2025
d2d8232
feat: update API documentation and structure
giuseppeambrosio97 Jun 3, 2025
289143f
feat: enhance BaseModelNN with comprehensive docstrings
giuseppeambrosio97 Jun 3, 2025
a66cb26
feat: update setup documentation and API references
giuseppeambrosio97 Jun 3, 2025
92dbecb
feat: restructure documentation and add new training and inference g…
fcdl94 Jun 3, 2025
e4dc2d5
feat: enhance API documentation and restructure model references
giuseppeambrosio97 Jun 4, 2025
45126cb
refactor: remove list_shared_datasets method from FocoosHUB class
giuseppeambrosio97 Jun 4, 2025
c671c6b
feat: add Focoos HUB integration tutorial notebook
giuseppeambrosio97 Jun 4, 2025
b3f80a6
feat: expand documentation with main concepts and model usage
fcdl94 Jun 4, 2025
46bb7f9
docs: update notebooks and readme
CuriousDolphin Jun 4, 2025
d641f45
fix typo
CuriousDolphin Jun 4, 2025
dda056f
remove outdated howto and fix tests
CuriousDolphin Jun 4, 2025
641e638
feat: enhance Backbone with model size configurations and logging
fcdl94 Jun 4, 2025
31d2e93
feat: add configuration options for ResNet and STDC backbones to fix …
fcdl94 Jun 4, 2025
84aaca2
feat: add Focoos HUB documentation and structure
giuseppeambrosio97 Jun 4, 2025
0f054af
feat: update documentation and navigation structure
fcdl94 Jun 4, 2025
e32f210
minor fixes
CuriousDolphin Jun 4, 2025
d756566
docs: enhance model documentation and references
fcdl94 Jun 4, 2025
1d06243
refactor: remove outdated MIT backbone configuration
fcdl94 Jun 4, 2025
0d3e3f1
docs: missing links
fcdl94 Jun 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/cpu/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"remoteUser": "root",
"workspaceFolder": "${localWorkspaceFolder}",
"workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind",
"postCreateCommand": "uv pip install -e .[cpu,dev]",
"postCreateCommand": "uv pip install -e .[onnx-cpu,dev]",
"remoteEnv": {
"UV_SYSTEM_PYTHON": "true"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Focoos GPU (OnnxRuntime, CUDA)",
"build": {
"target": "focoos-cuda",
"target": "focoos-gpu",
"context": "../..",
"dockerfile": "../../Dockerfile",
},
Expand All @@ -12,7 +12,7 @@
},
"workspaceFolder": "${localWorkspaceFolder}",
"workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind",
"postCreateCommand": "uv pip install -e .[cuda,dev]",
"postCreateCommand": "uv pip install -e .[onnx,dev]",
"remoteEnv": {
"UV_SYSTEM_PYTHON": "true"
},
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/tensorrt/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Focoos GPU (OnnxRuntime, Torch, TensorRT)",
"name": "Focoos GPU (OnnxRuntime, TensorRT)",
"build": {
"context": "../..",
"dockerfile": "../../Dockerfile",
Expand Down
80 changes: 0 additions & 80 deletions .devcontainer/torch/devcontainer.json

This file was deleted.

43 changes: 40 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
env:
UV_SYSTEM_PYTHON: 1
jobs:
Run-test:

code-tests:
permissions:
id-token: write # This is required for requesting the JWT
contents: read
Expand All @@ -30,7 +29,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: 📦 Install dev dependencies
run: uv pip install .[cpu,dev]
run: uv sync --extra dev --extra onnx-cpu
- name: 🧪 Run test
run: make test
- name: 📊 Generate test coverage report
Expand All @@ -40,3 +39,41 @@ jobs:
pytest-xml-coverage-path: ./tests/coverage.xml
junitxml-path: ./tests/junit.xml
report-only-changed-files: true
hide-report: true
model-tests:
runs-on: actions-runner-cuda12
steps:
- name: 📥 Checkout Repository
uses: actions/checkout@v4
- name: 🐍 Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: 🐍 Setup uv
uses: astral-sh/setup-uv@v4
with:
python-version: "3.12"
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: 📦 Install dev dependencies
run: uv sync --extra dev --extra onnx
- name: 🧪 Run e2e tests for all models
run: |
echo "🔍 Discovering models in model registry..."
MODELS=$(find ./focoos/model_registry -maxdepth 1 -type f -name "*.json" | xargs -n1 basename | sed 's/\.json$//')

if [ -z "$MODELS" ]; then
echo "⚠️ No models found in registry"
exit 1
fi

echo "📋 Found models: $(echo "$MODELS" | tr '\n' ' ')"

for model in $MODELS; do
echo "🧪 Testing model: $model"
uv run ops/test_training.py --model "$model"
done

echo "✅ All model tests completed successfully"
- name: 🧹 Minimize uv cache
run: uv cache prune --ci
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,10 @@ notebooks/.data
/data
tests/junit.xml
notebooks/datasets
notebooks/experiments
site/
/datasets/
/examples/
notebooks/test.ipynb
gradio/output/
tutorials/experiments
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

22 changes: 5 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,24 @@
FROM python:3.12-slim-bullseye AS focoos-cpu
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
LABEL authors="focoos.ai"
RUN apt-get update && \
RUN apt-get update --fix-missing && \
apt-get install -y --no-install-recommends \
build-essential git ffmpeg libsm6 libxext6 gcc libmagic1 wget make cmake
WORKDIR /app
COPY focoos ./focoos
COPY pyproject.toml ./pyproject.toml
RUN uv pip install --system -e .[cpu]
RUN uv pip install --system -e .[onnx-cpu]


FROM ghcr.io/focoosai/deeplearning:base-cu12-cudnn9-py312-uv AS focoos-cuda
FROM ghcr.io/focoosai/deeplearning:base-cu12-cudnn9-py312-uv AS focoos-gpu
LABEL authors="focoos.ai"

WORKDIR /app

COPY focoos ./focoos
COPY pyproject.toml ./pyproject.toml
RUN uv pip install --system -e .[cuda]
RUN uv pip install --system -e .[onnx]


FROM focoos-cuda AS focoos-torch
RUN uv pip install --system -e .[torch]

FROM focoos-torch AS focoos-tensorrt
RUN apt-get update && apt-get install -y \
wget lsb-release && \
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb && \
dpkg -i cuda-keyring_1.1-1_all.deb && \
apt-get update && apt-get install -y \
tensorrt \
python3-libnvinfer-dev \
uff-converter-tf && \
apt-get clean && rm -rf /var/lib/apt/lists/*
FROM focoos-gpu AS focoos-tensorrt
RUN uv pip install --system -e .[tensorrt]
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ venv:
@uv venv --python=python3.12

install: .uv .pre-commit
@uv pip install -e ".[dev,docs]" --no-cache-dir
@uv sync --extra onnx --extra tensorrt --extra dev --extra docs
@pre-commit install

install-gpu: .uv .pre-commit
@uv pip install -e ".[dev,cuda,tensorrt,torch,docs]" --no-cache-dir
install-cpu: .uv .pre-commit
@uv sync --extra onnx-cpu --extra dev --extra docs
@pre-commit install



docs:
@mkdocs build --clean
@uv run mkdocs build --clean

serve-docs:
@mkdocs serve
@uv run mkdocs serve

lint:
@ruff check ./focoos ./tests ./notebooks --fix
Expand All @@ -31,7 +33,7 @@ run-pre-commit: .pre-commit
@pre-commit run --all-files

test:
@pytest -s --cov=focoos --cov-report="xml:tests/coverage.xml" --cov-report=html --junitxml=./tests/junit.xml && rm -f .coverage
@uv run pytest -s tests --cov=focoos --cov-report=term-missing:skip-covered --cov-report="xml:tests/coverage.xml" --cov-report=html --junitxml=./tests/junit.xml && rm -f .coverage

tox:
tox
Expand Down
Loading
Loading