Plant trees from aerial imagery and ship both vision detectors - #120
Merged
Conversation
- ship yolov8n-obb (AGPL-3.0) and deepforest-tree (MIT) in models/ via Git LFS, converted by tools/vision/export_models.py - add Head::Retina so the DeepForest anchor grid is rebuilt in Rust, tested against torchvision - tree classes (kind: Tree) become rows in the line's tree list, grown to the measured crown within 0.6-1.5 - conifer guess from crown contrast and warmth (canopy.rs), overridable via Species/stand in the dialog - state a footprint for all 84 tree objects, measured by the importer - grid-based occupancy test and third-crown spacing so a second run is a no-op
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.
Summary
kind: Treeinai.ronplants finds as ordinary rows in the line's tree list (viaTreeSource) instead of objects bolted to the track graph — selectable, deletable, and undoable exactly like hand-planted trees (vision::canopy,route-editor/src/ai.rs).mods/treesobjects gained afootprintmeasured off the builtcrown_LOD0mesh by the updatedtools/trees/import_mantissa.py.vision::canopyclassifies crowns via two ratio-based features (brightness spread and red/blue warmth), thresholds calibrated on real provider imagery; both must agree.nadelwald,laubwald, …) which plants like the forest brush; also available headless via--stand.Head::Retina: torchvision RetinaNet emits logits/offsets per anchor with no boxes; the anchor grid is rebuilt in Rust and validated against torchvision's numbers (including banker's-rounding edge cases).models/(Git LFS):yolov8n-obb.onnx(12.7 MB, AGPL-3.0, Ultralytics/DOTA) anddeepforest-tree.onnx(129 MB, MIT, DeepForest/NEON). Licence implications documented inmodels/LICENSES.md,THIRD_PARTY_LICENSES.md, and the README; deleting the AGPL file degrades gracefully.spanfield for classes where the factor-of-two size rule is wrong (crowns range 3–25 m);/models/removed from.gitignore, LFS tracking added in.gitattributes;tools/vision/export_models.pyreproduces both conversions.ai::Occupied) instead of a list, so tens of thousands of trees don't freeze the editor; tree de-duplication uses ⅓-crown spacing (configurable "Keep trees apart").ai-place-trees,ai-species,ai-tree-spacing, …) added to bothenanddelocales.tools/vision/README.md.Testing
cargo test --workspace: 1136 existing tests plus newcrates/vision/tests/shipped.rs(136 lines) covering the shipped detectors — including Retina anchor-grid validation against torchvision reference numbers.cargo test -p i18nconfirms en/de key parity for the new strings.--detect-run --stand nadelwald) writing trees into the route file: not verified in this summary — run locally if needed.git lfs pull) and editor behaviour withyolov8n-obb.onnxdeleted (graceful "not installed" report): not run.