Kitti OD export plugin#10
Conversation
|
Warning Review limit reached
More reviews will be available in 44 minutes and 39 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughA new ChangesKITTI Export Plugin
Sequence Diagram(s)sequenceDiagram
participant Studio as lightly-studio
participant ExportKittiOperator
participant KittiObjectDetectionInput
participant KittiObjectDetectionOutput
Studio->>ExportKittiOperator: execute(session, context, parameters)
ExportKittiOperator->>ExportKittiOperator: fetch Collection, resolve ImageFilter via _get_image_filter
ExportKittiOperator->>ExportKittiOperator: build ImageSample list, compute common root via _get_common_image_root
ExportKittiOperator->>KittiObjectDetectionInput: __init__(session, dataset_id, samples, images_root)
KittiObjectDetectionInput->>KittiObjectDetectionInput: get_images() — rewrite paths relative to images_root
KittiObjectDetectionInput->>KittiObjectDetectionInput: get_labels() — emit ImageObjectDetection with _get_kitti_filename paths
ExportKittiOperator->>KittiObjectDetectionOutput: save(kitti_input, output_folder)
KittiObjectDetectionOutput-->>ExportKittiOperator: .txt label files written to output_folder
ExportKittiOperator-->>Studio: OperatorResult(success/failure message)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
plugins/kitti_export/Makefile (1)
1-13: 💤 Low valueConsider adding standard Makefile targets.
While the current targets (
install,format,type-check) cover essential plugin development workflows, Makefile conventions suggest including:
test: run the plugin's test suite (if tests exist or will be added)clean: remove build artifacts and cache directories.PHONYalready covers the current targets ✓This is a style improvement; the current setup is functional.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@plugins/kitti_export/Makefile` around lines 1 - 13, Add two standard Makefile targets following conventions: a test target that runs the plugin's test suite using an appropriate test runner (such as uv run pytest), and a clean target that removes build artifacts and cache directories (such as dist/, build/, __pycache__/, .mypy_cache/, and .ruff_cache/). Update the .PHONY declaration at the beginning of the Makefile to include both test and clean targets alongside the existing install, format, and type-check targets.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/kitti_export/pyproject.toml`:
- Around line 6-10: The dependencies list in the pyproject.toml file includes
labelformat and sqlmodel without version constraints, which could lead to
compatibility issues if incompatible versions are installed. Add version bounds
to both the labelformat and sqlmodel entries in the dependencies array using the
format "package>=minimum.version" (and optionally maximum versions like
"package>=minimum.version,<maximum.version") to ensure reproducible
installations and prevent API mismatches at runtime.
---
Nitpick comments:
In `@plugins/kitti_export/Makefile`:
- Around line 1-13: Add two standard Makefile targets following conventions: a
test target that runs the plugin's test suite using an appropriate test runner
(such as uv run pytest), and a clean target that removes build artifacts and
cache directories (such as dist/, build/, __pycache__/, .mypy_cache/, and
.ruff_cache/). Update the .PHONY declaration at the beginning of the Makefile to
include both test and clean targets alongside the existing install, format, and
type-check targets.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2804bdae-4e61-4e5d-83b9-19206d30c0fd
📒 Files selected for processing (7)
README.mdplugins.tomlplugins/kitti_export/LICENSEplugins/kitti_export/Makefileplugins/kitti_export/pyproject.tomlplugins/kitti_export/src/lightly_plugins_kitti_export/__init__.pyplugins/kitti_export/src/lightly_plugins_kitti_export/operator.py
|
/review |
What has changed and why?
Adding a Plugin to export Kitti OD files.
How has it been tested?
Installed locally
Did you update Readme.md and plugins.toml?
Summary
This pull request adds a new KITTI OD (Object Detection) export plugin to the lightly-studio-plugins repository.
Changes
plugins/kitti_export/with:ExportKittiOperator: Main operator class that exports filtered image samples to KITTI object-detection formatKittiObjectDetectionInput: Input handler that rewrites image and label filenames to KITTI-compatible relative pathsThe plugin integrates with lightly-studio's operator framework and provides functionality to export collections as KITTI
.txtlabel files while preserving nested folder structure.