How ysj9909/soma works
Project type and purpose
• This is a research‐grade machine‐learning codebase for domain-generalized semantic segmentation and object detection.
• It builds on open-source toolkits (MMDetection, MMSegmentation) and a Parameter-Efficient Fine-Tuning (PEFT) method called SoMA, applying singular value decomposition to minor components of backbone weights (DINOv2) for robust performance on unseen domains.
File structure
• Top-level directories:
• configs/ – base and project-specific configuration files
• DGOD/ – “Domain Generalizable Object Detection” integration with mmdet
• rein/ – “Rein” integration for segmentation (backbones & segmentors)
• projects/ – example project forks (CO_DETR)
• Key patterns:
• Config-driven architecture: configs organize datasets, models, schedules, runtime.
• Modular model code under DGOD/mmdet and rein/models, following registry+builder patterns.
• Training/eval drivers in tools and DGOD/tools.
• Pre-trained weight conversion & merging scripts for inference pipeline.
README for additional insights
• Describes SoMA’s purpose: freeze major singular values, adapt minor ones for domain generalization.
• Provides environment setup, data preparation pointers (Rein, Diverse Weather), weight conversion, merging, training and evaluation commands.
• Highlights two tasks: Domain-Generalized Semantic Segmentation (under rein + MMSegmentation) and Domain-Generalized Object Detection (under DGOD + MMDetection).
Elements
• Config → Data Loader / Model Builder / Training Engine
• Data Loader → Model → Loss Computation → Optimizer → Checkpoint
• Pre-trained Weights → Convert Script → Converted Backbone
• Converted Backbone + SoMA Checkpoint → Merge Script → Inference Checkpoint
• Inference Checkpoint → Evaluation → Metrics
• Blue for data / dataset modules
• Green for model components
• Orange for training & hooks
• Purple for tools/utilities (conversion, merge)
• Pink for external dependencies
Detail without overthinking
• Break out every submodule: configs/_base_, rein/models/backbones, DGOD/mmdet/engine/hooks, etc.
• Both high-level pipelines (seg & det) and deeper building blocks (assigners, samplers, transforms).