Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
edb1b4b
feat: embedding extraction implementation
unaxEtxeberriaBieleDigital Aug 10, 2026
65f7eb7
feat: tests of the new feature
unaxEtxeberriaBieleDigital Aug 10, 2026
895e239
update: gitignore actualization
unaxEtxeberriaBieleDigital Aug 10, 2026
d8c1960
Merge remote-tracking branch 'origin/develop' into feat/embedding-ext…
unaxEtxeberriaBieleDigital Aug 11, 2026
3ea9adc
update: changes documented
unaxEtxeberriaBieleDigital Aug 11, 2026
1409695
Merge branch 'roboflow:develop' into feat/embedding-extraction
unaxEtxeberriaBieleDigital Aug 11, 2026
7c45d40
Merge branch 'develop' of https://github.com/unaxEtxeberriaBieleDigit…
unaxEtxeberriaBieleDigital Aug 11, 2026
926e7aa
Merge branch 'develop' into feat/embedding-extraction
unaxEtxeberriaBieleDigital Aug 11, 2026
b859431
Merge branch 'feat/embedding-extraction' of https://github.com/unaxEt…
unaxEtxeberriaBieleDigital Aug 11, 2026
50d0ccc
fix(pre-commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Aug 11, 2026
0cade54
update: the returened embedding only contain the last layer of the de…
unaxEtxeberriaBieleDigital Aug 11, 2026
f88f7ec
Merge branch 'feat/embedding-extraction' of https://github.com/unaxEt…
unaxEtxeberriaBieleDigital Aug 11, 2026
e4d2f92
update: slight changes to pass the tests
unaxEtxeberriaBieleDigital Aug 13, 2026
f092424
fix(pre-commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Aug 13, 2026
62dabbd
Merge branch 'roboflow:develop' into feat/embedding-extraction
unaxEtxeberriaBieleDigital Aug 13, 2026
ac73c16
Merge branch 'roboflow:develop' into develop
unaxEtxeberriaBieleDigital Aug 13, 2026
b6e0b18
Merge branch 'develop' into feat/embedding-extraction
unaxEtxeberriaBieleDigital Aug 13, 2026
47b8163
Merge branch 'develop' into feat/embedding-extraction
unaxEtxeberriaBieleDigital Aug 13, 2026
bb748c9
Retrigger CI
unaxEtxeberriaBieleDigital Aug 13, 2026
2a4f855
Merge branch 'develop' into feat/embedding-extraction
Borda Aug 18, 2026
c1df841
fix(postprocess): filter embeddings by score_threshold to match masks
unaxEtxeberriaBieleDigital Aug 18, 2026
cb60ff1
test: add required Examples doctests to lwdetr embedding test helpers
unaxEtxeberriaBieleDigital Aug 18, 2026
8d79f82
test: add Examples doctest to _make_optimized_embeddings_model
unaxEtxeberriaBieleDigital Aug 18, 2026
82ef9ee
Merge branch 'feat/embedding-extraction' of https://github.com/unaxEt…
unaxEtxeberriaBieleDigital Aug 18, 2026
4d083c4
Merge branch 'roboflow:develop' into feat/embedding-extraction
unaxEtxeberriaBieleDigital Aug 20, 2026
b2b9ae9
docs(cookbooks): add query-embedding dataset auditing notebook
unaxEtxeberriaBieleDigital Aug 21, 2026
9c0833e
Merge branch 'roboflow:develop' into feat/embedding-extraction
unaxEtxeberriaBieleDigital Aug 21, 2026
bb9a455
Notebook
unaxEtxeberriaBieleDigital Aug 28, 2026
14aa371
Merge branch 'feat/embedding-extraction' of https://github.com/unaxEt…
unaxEtxeberriaBieleDigital Aug 28, 2026
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
__pycache__/
*.py[cod]
*$py.class
visualizer
.vscode

# C extensions
*.so
Expand Down Expand Up @@ -227,5 +229,10 @@ docs/cookbooks/*.py
docs/cookbooks/export_executorch/
docs/cookbooks/export_tensorrt/

# deprecated code
visualizer

# VSCode metadata directory
.vscode
# MacOS files
.DS_Store
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

### Added

- `RFDETR.predict(..., return_embeddings=True)` now attaches a per-detection embedding vector as `detections.data["embeddings"]` (or `key_points.data["embeddings"]` for keypoint outputs), shape `(K, H)`, gathered with the same indices used for boxes/masks/keypoints — useful for downstream similarity search, clustering, or re-identification. On the eager (unoptimized) model this can be toggled per `predict()` call. On a model optimized via `model.inference(...)`, the exported/traced forward pass has fixed control flow, so `inference()` now also accepts `return_embeddings` and the value must be decided at optimization time and match the `return_embeddings` passed to `predict()`; a mismatch raises `RuntimeError`.

- Added the `embedding-extraction` cookbook, a Colab-runnable notebook that extracts per-detection query embeddings on a public COCO 2017 validation subset (streamed from a Hugging Face parquet export, no API key) and applies them to dataset quality auditing: ranking mislabelled annotations against injected label noise (reported as ROC-AUC and precision@k versus random review), surfacing confident detections with no matching annotation, and nearest-neighbour object retrieval.

- `deploy_to_roboflow()`'s `version` argument is now optional: when omitted, the highest existing dataset version of the target project is resolved automatically via the Roboflow API (falling back to version `1` for a project with no generated versions, where the Roboflow SDK then raises its usual "Version number 1 is not found."). Passing an explicit `version` behaves exactly as before, with no extra API call. ([#1116](https://github.com/roboflow/rf-detr/issues/1116))

- Added a live opt-in end-to-end CI job (`roboflow-deploy-e2e`, `-m e2e_roboflow`) that generates a fresh dataset version in a dedicated Roboflow test project, deploys a real model with `version` omitted, and independently polls the server-side trained-model status — catching silent server-side upload failures that `deploy_to_roboflow()`'s return value cannot surface. ([#1116](https://github.com/roboflow/rf-detr/issues/1116))
Expand Down
3 changes: 2 additions & 1 deletion docs/cookbooks/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ If jupytext is not installed: `pip install jupytext` (or `uv add jupytext --dev`
description: One sentence describing what the notebook demonstrates.
```

Available labels (reuse these to keep tags standardised): `TRAINING`, `AUGMENTATION`, `EXPORT`, `TFLITE`, `PYTORCH LIGHTNING`, `INFERENCE`, `SEGMENTATION`, `DEPLOY`. Current tag colours are assigned dynamically by the docs UI, so they may change if cards or labels are added or reordered.
Available labels (reuse these to keep tags standardised): `TRAINING`, `AUGMENTATION`, `EXPORT`, `TFLITE`, `PYTORCH LIGHTNING`, `INFERENCE`, `SEGMENTATION`, `DEPLOY`, `EMBEDDINGS`. Current tag colours are assigned dynamically by the docs UI, so they may change if cards or labels are added or reordered.

For newly added or updated notebooks, write markdown cells in plain, notebook-portable Markdown only — no MkDocs Material syntax (`!!! note`, `=== "Tab"`, admonition blocks). `mkdocs-jupyter` renders the site copy through the same plain renderer as a raw `.ipynb`, so MkDocs-only syntax shows up as literal text (e.g. `!!! warning "..."`) instead of a styled callout. Use a blockquote (`> **Note:** ...`) for callouts instead.

Expand All @@ -51,6 +51,7 @@ For newly added or updated notebooks, write markdown cells in plain, notebook-po
| ----------------------------------- | ----------------------------------------------- | ------- |
| `custom-augmentations.ipynb` | Custom Augmentations and Live Training Progress | v1.5.0 |
| `custom-optimizer-scheduler.ipynb` | Custom Optimizer and LR Scheduler | v1.9.0 |
| `embedding-extraction.ipynb` | Query Embeddings for Dataset Quality Auditing | v1.10.0 |
| `export-coreml.ipynb` | Export to Native CoreML & Run Inference | v1.9.0 |
| `export-tensorrt.ipynb` | Export to TensorRT & Run Inference | v1.9.0 |
| `export-executorch.ipynb` | Export to ExecuTorch & Run Inference | v1.9.0 |
Expand Down
6 changes: 6 additions & 0 deletions docs/cookbooks/cards.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
cards:
- href: embedding-extraction/
name: "Query Embeddings for Dataset Quality Auditing"
labels: [INFERENCE, EMBEDDINGS]
version: v1.10.0
author: unaxEtxeberriaBieleDigital
description: "Extract per-detection query embeddings with predict(return_embeddings=True) and use them to rank mislabelled annotations, surface unannotated objects, and retrieve similar instances — measured on a public COCO subset."
- href: export-coreml/
name: "Export to Native CoreML & Run Inference"
labels: [EXPORT, INFERENCE, DEPLOY]
Expand Down
Loading
Loading