Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Migrate classification to timm backbones with configurable multi-head heads#5

Open
cto-new[bot] wants to merge 1 commit intomasterTingelam/DeepLearningExamples:masterfrom
feat/timm-resnet-configurable-multi-headsTingelam/DeepLearningExamples:feat/timm-resnet-configurable-multi-headsCopy head branch name to clipboard
Open

Migrate classification to timm backbones with configurable multi-head heads#5
cto-new[bot] wants to merge 1 commit intomasterTingelam/DeepLearningExamples:masterfrom
feat/timm-resnet-configurable-multi-headsTingelam/DeepLearningExamples:feat/timm-resnet-configurable-multi-headsCopy head branch name to clipboard

Conversation

@cto-new
Copy link

@cto-new cto-new bot commented Nov 23, 2025

Summary

Enable timm-backed backbones for classification and switch to a config-driven multi-head classifier. This allows adding new attribute tasks by configuration without code changes, and exposes per-head metrics during training/evaluation.

Details

  • Add timm to requirements.txt and document dependency in README.md
  • Rewrite src/classification/models.py to instantiate backbones via timm.create_model (ResNet family) with options for pretrained weights, freezing, and feature extraction
  • Implement config-driven multi-head classifier: parse per-attribute definitions in configs/classification_config.yaml (num_classes, loss, metrics) via resolve_classification_task_config and dynamic heads
  • Generalize ClassificationTrainer to support arbitrary heads and log per-head metrics during train/validate
  • Extend src/pipelines/pipeline.py to handle arbitrary number of heads/targets returned by timm models and log per-head metrics
  • Update configs/classification_config.yaml with new schema and provide examples for vehicle_types and human_attributes
  • Refresh docs/tutorials describing how to extend classification tasks via configuration
  • Update README and docs to mention timm as dependency and new configuration-driven approach

Migration Notes

  • Existing configuration files may require updates to align with the new classification schema. New tasks can be added by defining a new entry under classification.tasks.

Warning: Task VM test is not passing, cto.new will perform much better if you fix the setup

…-head classification

Introduce timm-based ResNet backbones for classification, enabling pretrained options, layer freezing, and feature extraction. Replace hard-coded per-attribute heads with a config-driven multi-head classifier, parsed from configs/classification_config.yaml. Extend pipeline and trainer to support arbitrary numbers of heads and per-head metrics, with per-head logging. Extend config schema and docs; add timm to requirements and README. Update training/inference scripts to support classification_task and per-head outputs. Add examples for vehicle types and human attributes and update docs accordingly.

BREAKING CHANGE: classification_task must be provided when using the classification task; new config schema required for classification tasks; outputs per-head metrics are introduced.
@Tingelam Tingelam marked this pull request as ready for review November 23, 2025 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.