model bank initial structure with support for dino v3 and yolo#240
model bank initial structure with support for dino v3 and yolo#240yashasvi-pedireddi-mt wants to merge 3 commits intodevfrom
Conversation
There was a problem hiding this comment.
let's remove the lockfile
| "transformers>=4.57.0", | ||
| "torch>=2.8.0", | ||
| "peft>=0.17.1", | ||
| "matplotlib>=3.10.7", | ||
| "pillow>=11.3.0", | ||
| "ultralytics>=8.3.213", |
There was a problem hiding this comment.
let's move these dependencies to mindtrace/models/pyproject.toml
| *.caffemodel | ||
| *.prototxt | ||
| *.params | ||
| *.json |
There was a problem hiding this comment.
we might want to include some json config files in the package (and subpackages), so let's not ignore *.json.
Plus if there are some config files related to models that might get downloaded, hopefully they'll all be in some known directory, and that dir can be added to gitignore.
| # Add the project root to the path | ||
| project_root = Path(__file__).parent.parent.parent.parent.parent.parent | ||
| sys.path.insert(0, str(project_root)) |
There was a problem hiding this comment.
what's going on?
let's remove please.
| @@ -0,0 +1,7 @@ | |||
| path: /home/yash/codebase/mindtrace_model_bank/mindtrace/tests/integration/mindtrace/models/standalone/datasets/cls | |||
There was a problem hiding this comment.
why is there a local absolute path pushed here?
There was a problem hiding this comment.
i think .cache files should be gitignored, and should automatically get created locally when running tests?
There was a problem hiding this comment.
let's try to reduce the size for this one.
11 MB for a single image for testing purposes is huge.
| def train(self, **kwargs) -> Any: | ||
| """ | ||
| Optional: single training step (forward + loss computation + backward). | ||
| Can raise NotImplementedError if training is not supported. |
| # Add the project root to the path | ||
| project_root = Path(__file__).parent.parent.parent.parent.parent.parent | ||
| sys.path.insert(0, str(project_root)) |
There was a problem hiding this comment.
let's remove please. not needed.
| if __name__ == "__main__": | ||
| exit_code = main() | ||
| sys.exit(exit_code) |
There was a problem hiding this comment.
we don't need if __name == "__main__" sections for tests. let's remove please.
they can be run via ds test: path/to/test.py
| print("\n" + "=" * 50) | ||
| print("TEST SUMMARY") | ||
| print("=" * 50) |
There was a problem hiding this comment.
please let's remove all prints from tests.
if a script is meant to be run on its own to demonstrate or check some behaviour it would be better placed in samples/models/
|
For the base classes, let's inherit from |
🚀 Model Bank v1 - Initial Implementation
Overview
This PR introduces the initial structure for the Mindtrace Model Bank, providing a unified interface for computer vision models with support for YOLO implementations and DINOv3 backbone models.
🏗️ Architecture
Base Classes
StandaloneBase(base/model_base.py): Abstract interface for monolithic computer vision models (YOLOv10, YOLOv11, DETR, SAM, etc.)TransformerBackboneBase(base/transformer_backbone_base.py): Abstract interface for backbone models with attention visualization capabilitiesModel Implementations
1. YOLO Model (
standalone/yolo/)2. DINOv3 Backbone (
backbones/dinov3.py)