feat(cli): add rfdetr export subcommand for ONNX/TFLite export#1067
Draft
omkar-334 wants to merge 5 commits into
Draft
feat(cli): add rfdetr export subcommand for ONNX/TFLite export#1067omkar-334 wants to merge 5 commits into
rfdetr export subcommand for ONNX/TFLite export#1067omkar-334 wants to merge 5 commits into
Conversation
Codecov Report❌ Patch coverage is ❌ Your project check has failed because the head coverage (77%) is below the target coverage (95%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #1067 +/- ##
=======================================
Coverage 77% 77%
=======================================
Files 102 103 +1
Lines 9047 9096 +49
=======================================
+ Hits 6979 7024 +45
- Misses 2068 2072 +4 🚀 New features to boost your workflow:
|
Member
|
Lte's do not add it until it is stable, so far I tested TFlite, the predictions were quite questionable... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a command-line path for exporting trained RF-DETR checkpoints, resolving the long-standing TODO in
rfdetr/export/main.pyto expose TFLite export (and its quantization / calibration options) from the shell. Until now, export was reachable only from Python viaRFDETR.export(format=...).Rather than extend the legacy argparser, this adds a proper
rfdetr exportsubcommand that wrapsRFDETR.export(TFLite already worked in Python; this surfaces it to the CLI).Related to #1024
Type of Change
Testing
Test details:
I verified the training and export end to end -> Train a checkpoint, run
rfdetr export --checkpoint <ckpt> --format onnx, and the exportedrfdetr-nano.onnxloads and runs in onnxruntime (dets/labelsoutputs).Checklist
Additional Context
export(jsonargparse) andfit/validate/test/predict(LightningCLI) are two different parsers, so a singlerfdetrcommand needs a thin root to choose between them. Treating LightningCLI as the root would force the[train]extra on export-only users and produce a stitched, two-part top-level--help. The root therefore owns top-level help and dispatch and delegates to each backend, which leaves LightningCLI's training semantics untouched and keeps per-commandrfdetr <command> --helpbackend-native.Usage