Skip to content

Add EdgeCrafter Model#6940

Queued
kprokofi wants to merge 18 commits into
developfrom
kprokofi/add-edge-crafter
Queued

Add EdgeCrafter Model#6940
kprokofi wants to merge 18 commits into
developfrom
kprokofi/add-edge-crafter

Conversation

@kprokofi

Copy link
Copy Markdown
Contributor

Summary

How to test

Checklist

  • The PR title and description are clear and descriptive
  • I have manually tested the changes
  • All changes are covered by automated tests
  • All related issues are linked to this PR (if applicable)
  • Documentation has been updated (if applicable)

@github-actions github-actions Bot added TEST Any changes in tests Geti Backend Issues related to the Geti application server Geti Library Issues related to Geti Library (OTX) labels Jun 29, 2026
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

⏱️ Backend import time — app.main

Accelerator Cumulative (s) Self (s)
cpu 4.413 0.003
xpu 4.432 0.003
cuda 4.666 0.003

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

📊 Test coverage report

Metric Coverage
Lines 60.0%
Functions 56.7%
Branches 51.5%
Statements 59.6%

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

🐳 Docker image sizes

Device Size
cpu 4002.9 MB (3.91 GB)
xpu 10791.5 MB (10.54 GB)
cuda 10198.1 MB (9.96 GB)

@kprokofi kprokofi force-pushed the kprokofi/add-edge-crafter branch from b5548ae to 31213e2 Compare July 3, 2026 10:06
@kprokofi kprokofi force-pushed the kprokofi/add-edge-crafter branch from 89206dc to 34d6eb3 Compare July 3, 2026 11:33
@kprokofi kprokofi marked this pull request as ready for review July 6, 2026 13:03
@kprokofi kprokofi requested a review from a team as a code owner July 6, 2026 13:03
Copilot AI review requested due to automatic review settings July 6, 2026 13:03
@kprokofi kprokofi requested a review from a team as a code owner July 6, 2026 13:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces the EdgeCrafter (ECDet) object detection model family into the GetiTune library and exposes the new architectures in the backend via supported-model manifests and config conversion mappings.

Changes:

  • Added EdgeCrafter detection recipes and backend manifests for S/M/L/X variants.
  • Implemented EdgeCrafter model components in the library (backbone, decoder/head, loss, detector wrapper, and shared mixin) and wired them into existing registries/config tables.
  • Updated backend model-architectures endpoint tests to account for the additional detection manifests.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
library/src/getitune/recipe/detection/edgecrafter_s.yaml Adds ECDet-S training recipe configuration.
library/src/getitune/recipe/detection/edgecrafter_m.yaml Adds ECDet-M training recipe configuration.
library/src/getitune/recipe/detection/edgecrafter_l.yaml Adds ECDet-L training recipe configuration.
library/src/getitune/recipe/detection/edgecrafter_x.yaml Adds ECDet-X training recipe configuration.
library/src/getitune/backend/lightning/models/detection/edgecrafter.py Adds Lightning detection model wrapper for EdgeCrafter.
library/src/getitune/backend/lightning/models/instance_segmentation/edgecrafter_inst.py Adds Lightning instance-segmentation wrapper for EdgeCrafter (ECSeg weights).
library/src/getitune/backend/lightning/models/instance_segmentation/__init__.py Exports EdgeCrafterInst from the instance segmentation models package.
library/src/getitune/backend/lightning/models/detection/necks/dfine_hybrid_encoder.py Registers EdgeCrafter variant configs for the hybrid encoder.
library/src/getitune/backend/lightning/models/detection/losses/ec_loss.py Adds ECCriterion with optional mask losses for instance segmentation.
library/src/getitune/backend/lightning/models/detection/losses/__init__.py Exposes ECCriterion from the detection losses package.
library/src/getitune/backend/lightning/models/detection/heads/ec_decoder.py Adds ECTransformer decoder and segmentation head implementation.
library/src/getitune/backend/lightning/models/detection/detectors/edgecrafter.py Adds DETR-style detector wrapper integrating the ECTransformer and optional masks.
library/src/getitune/backend/lightning/models/detection/detectors/__init__.py Exposes ECDETRDetector from the detectors package.
library/src/getitune/backend/lightning/models/detection/backbones/ecvit.py Adds ECViTAdapter backbone implementation for EdgeCrafter.
library/src/getitune/backend/lightning/models/detection/__init__.py Exposes EdgeCrafter from the detection models package.
library/src/getitune/backend/lightning/models/common/utils/assigners/hungarian_matcher.py Handles missing pred_masks safely in mask cost computation.
library/src/getitune/backend/lightning/models/common/edgecrafter_mixin.py Adds shared model construction, IO adaptation, and optimizer config for EdgeCrafter.
application/backend/app/supported_models/manifests/detection/edgecrafter_s.yaml Adds backend manifest for ECDet-S.
application/backend/app/supported_models/manifests/detection/edgecrafter_m.yaml Adds backend manifest for ECDet-M.
application/backend/app/supported_models/manifests/detection/edgecrafter_l.yaml Adds backend manifest for ECDet-L.
application/backend/app/supported_models/manifests/detection/edgecrafter_x.yaml Adds backend manifest for ECDet-X.
application/backend/app/execution/common/geti_config_converter.py Registers EdgeCrafter template IDs to map to GetiTune recipes.
application/backend/tests/unit/api/routers/test_model_architectures.py Updates expected detection model counts for manifests endpoint.

Comment thread library/src/getitune/backend/lightning/models/detection/heads/ec_decoder.py Outdated
Comment thread application/backend/app/execution/common/geti_config_converter.py Outdated
Comment thread application/backend/app/execution/common/geti_config_converter.py Outdated
Comment thread application/backend/app/execution/common/geti_config_converter.py Outdated
Comment thread application/backend/app/execution/common/geti_config_converter.py Outdated
@kprokofi

kprokofi commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author
image image

@AlbertvanHouten

Copy link
Copy Markdown
Contributor

It would be good to include one of the new models in the benchmark_manifest.

@kprokofi

kprokofi commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

detection

Model Dataset Scenario Val f1-score ↑ Val map ↑ Val map_50 ↑ Val map_75 ↑ Val map_large ↑ Val map_medium ↑ Val map_per_class ↑ Val map_small ↑ Val mar_1 ↑ Val mar_10 ↑ Val mar_100 ↑ Val mar_100_per_class ↑ Val mar_large ↑ Val mar_medium ↑ Val mar_small ↑ Train Time ↓ GPU Mem ↓ Test Latency ↓ Status
deimv2_l axial_mri default 0.6522 0.7292 0.9505 0.8939 0.8465 0.7063 -1.0000 0.9000 0.6638 0.8064 0.8638 -1.0000 0.9125 0.8600 0.9000 5m 38s 6.1 GB 0.1s 🆕
deimv2_l bccd default 0.8237 0.6502 0.9145 0.7522 0.7476 0.5272 -1.0000 0.1965 0.4220 0.6860 0.7870 -1.0000 0.8439 0.7299 0.3333 9m 26s 6.1 GB 0.2s 🆕
deimv2_l cable_damage default 0.9220 0.4697 0.9351 0.4330 0.5762 0.4551 -1.0000 0.1836 0.5138 0.5900 0.7015 -1.0000 0.7906 0.7079 0.3800 17m 43s 6.1 GB 0.1s 🆕
deimv2_l vehicles default 0.6858 0.2969 0.4281 0.3354 0.4527 0.3110 -1.0000 0.2689 0.3641 0.6956 0.7259 -1.0000 0.8200 0.7282 0.5665 106m 21s 6.3 GB 0.1s 🆕
edgecrafter_l axial_mri default 0.8913 0.7298 0.9842 0.9177 0.7582 0.7382 -1.0000 0.8000 0.6574 0.8213 0.8553 -1.0000 0.8938 0.8533 0.9000 7m 20s 3.2 GB 0.1s 🆕
edgecrafter_l bccd default 0.8340 0.6572 0.9189 0.7769 0.7534 0.5461 -1.0000 0.2139 0.4217 0.6859 0.7775 -1.0000 0.8534 0.7204 0.3278 16m 11s 3.3 GB 0.2s 🆕
edgecrafter_l cable_damage default 0.9267 0.4427 0.9142 0.3882 0.5378 0.4339 -1.0000 0.2663 0.4918 0.5904 0.6349 -1.0000 0.6534 0.6559 0.3800 39m 58s 3.2 GB 0.1s 🆕
edgecrafter_l vehicles default 0.6901 0.3047 0.4420 0.3384 0.4371 0.3227 -1.0000 0.2776 0.3697 0.6982 0.7235 -1.0000 0.8224 0.7258 0.5895 146m 27s 3.4 GB 0.1s 🆕
edgecrafter_m axial_mri default 0.7677 0.6874 0.9576 0.8318 0.7329 0.6848 -1.0000 1.0000 0.6596 0.8128 0.8638 -1.0000 0.8875 0.8700 1.0000 4m 35s 4.6 GB 0.1s 🆕
edgecrafter_m bccd default 0.8312 0.6489 0.9136 0.7687 0.7508 0.5440 -1.0000 0.1879 0.4211 0.6855 0.7872 -1.0000 0.8483 0.7306 0.3111 10m 51s 4.7 GB 0.2s 🆕
edgecrafter_m cable_damage default 0.9184 0.4671 0.9291 0.3724 0.5689 0.4533 -1.0000 0.2455 0.4964 0.5686 0.6630 -1.0000 0.7680 0.6693 0.3800 16m 13s 4.6 GB 0.1s 🆕
edgecrafter_m vehicles default 0.6809 0.2829 0.4180 0.3164 0.4213 0.2954 -1.0000 0.2240 0.3532 0.6647 0.7149 -1.0000 0.8163 0.7127 0.5658 47m 40s 4.9 GB 0.1s 🆕
edgecrafter_s axial_mri default 0.8454 0.6790 0.9590 0.8284 0.7289 0.6863 -1.0000 0.7333 0.6404 0.8064 0.8915 -1.0000 0.8938 0.8933 0.9000 4m 43s 3.4 GB 0.1s 🆕
edgecrafter_s bccd default 0.8282 0.6446 0.9075 0.7590 0.7507 0.5226 -1.0000 0.2500 0.4202 0.6849 0.7716 -1.0000 0.8526 0.7078 0.3111 12m 15s 3.4 GB 0.2s 🆕
edgecrafter_s cable_damage default 0.9178 0.4445 0.9314 0.3856 0.5662 0.4321 -1.0000 0.2137 0.4740 0.5618 0.6479 -1.0000 0.7602 0.6444 0.3800 17m 4s 3.4 GB 0.1s 🆕
edgecrafter_s vehicles default 0.6475 0.2199 0.3534 0.2389 0.3915 0.2473 -1.0000 0.1943 0.3060 0.6064 0.6363 -1.0000 0.7885 0.6358 0.4443 43m 1s 3.7 GB 0.1s 🆕
edgecrafter_x axial_mri default 0.7387 0.6850 0.9673 0.8974 0.7491 0.7132 -1.0000 1.0000 0.6851 0.8362 0.8702 -1.0000 0.8938 0.8633 1.0000 11m 47s 4.1 GB 0.2s 🆕
edgecrafter_x bccd default 0.8117 0.6426 0.9064 0.7621 0.7446 0.5282 -1.0000 0.2095 0.4143 0.6853 0.7734 -1.0000 0.8575 0.7112 0.2944 8m 3s 4.1 GB 0.2s 🆕
edgecrafter_x cable_damage default 0.9103 0.4450 0.9239 0.3873 0.5717 0.4304 -1.0000 0.1703 0.4741 0.5774 0.6927 -1.0000 0.7947 0.6981 0.4400 23m 58s 4.0 GB 0.1s 🆕
edgecrafter_x vehicles default 0.7000 0.3025 0.4472 0.3391 0.4472 0.3239 -1.0000 0.2878 0.3631 0.6931 0.7234 -1.0000 0.8207 0.7208 0.5835 145m 28s 4.2 GB 0.1s 🆕
rfdetr_large axial_mri default 0.7350 0.7501 0.9994 0.9457 0.8171 0.7893 -1.0000 0.8000 0.6596 0.8489 0.8489 -1.0000 0.8813 0.8400 0.9000 8m 45s 5.3 GB 0.2s 🆕
rfdetr_large bccd default 0.8341 0.6543 0.9212 0.7489 0.7565 0.5326 -1.0000 0.2209 0.4179 0.6747 0.7581 -1.0000 0.8385 0.7001 0.2722 10m 50s 5.3 GB 0.2s 🆕
rfdetr_large cable_damage default 0.9524 0.4658 0.9546 0.4138 0.5845 0.4501 -1.0000 0.2142 0.4991 0.5677 0.5907 -1.0000 0.6977 0.5860 0.3000 41m 1s 5.3 GB 0.1s 🆕
rfdetr_large vehicles default 0.6865 0.2976 0.4467 0.3343 0.4354 0.3129 -1.0000 0.2483 0.3448 0.6709 0.7061 -1.0000 0.8065 0.7098 0.5537 89m 43s 5.5 GB 0.1s 🆕

Comment thread library/src/getitune/backend/lightning/models/common/edgecrafter_mixin.py Outdated
Comment thread library/src/getitune/backend/lightning/models/common/edgecrafter_mixin.py Outdated
Comment thread library/src/getitune/backend/lightning/models/detection/backbones/ecvit.py Outdated
Comment thread library/src/getitune/backend/lightning/models/detection/heads/ec_decoder.py Outdated
Comment thread library/src/getitune/backend/lightning/models/detection/heads/ec_decoder.py Outdated
Comment thread library/src/getitune/backend/lightning/models/detection/edgecrafter.py Outdated
@kprokofi

kprokofi commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@itallix I applied all clean up suggestions in bbb56d1

Please, review once again

@kprokofi

kprokofi commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

edge_crafter_l metrics on WGISD after clean up:
image

So, all good here

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.

@kprokofi kprokofi added this pull request to the merge queue Jul 8, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Geti Backend Issues related to the Geti application server Geti Library Issues related to Geti Library (OTX) TEST Any changes in tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants