Adds YOLO-Master-EsMoE-N LoRA adaptation examples for brain-tumor and VisDrone #69
Open
Alanxtl wants to merge 2 commits into
Open
Adds YOLO-Master-EsMoE-N LoRA adaptation examples for brain-tumor and VisDrone #69Alanxtl wants to merge 2 commits into
Alanxtl wants to merge 2 commits into
Conversation
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
Fixes #50.
This PR adds YOLO-Master-EsMoE-N LoRA adaptation examples for two vertical scenarios: dense aerial detection on VisDrone and sparse medical detection on brain-tumor. It includes scenario-specific LoRA configs, a reusable rank-sweep script, recorded sweep results, and a guide covering rank selection, target-module choices, and common dataset pitfalls.
Edits to main code
ultralytics/validator.pyis currently missing import fortorch_distributed_zero_firstandLOCAL_RANK. Missing inplement for convert_ndjson_to_yolo_if_neededI add them
Changes
yolo_master_visdrone_lora.yamlfor dense aerial VisDrone LoRA fine-tuning.yolo_master_brain_tumor_lora.yamlfor sparse brain-tumor LoRA fine-tuning.run_yolo_master_lora_rank_sweep.pyto run rank sweeps withr=4,8,16.yolo_master_lora_rank_sweep_results.csvwith recorded metrics, trainable params, training time, and peak VRAM.yolo_master_lora_scenarios_README.mdwith:LoRA Design Notes
Both scenario configs expose the requested LoRA controls:
lora_rlora_alphalora_use_rsloralora_target_moduleslora_include_attentionlora_gradient_checkpointingFor YOLO-Master-EsMoE-N, the default recipes adapt convolution and expert-projection modules while excluding router/gating layers:
This keeps expert routing stable during short few-shot fine-tuning runs. Router LoRA can still be evaluated separately as an ablation.
Experiments
Rank sweeps were run within the 20-50 epoch constraint.