matlab/matlab-agentic-toolkit / skills-catalog/image-processing-and-computer-vision/matlab-integrate-pytorch-vision
matlab-integrate-pytorch-vision
VerifiedCreates MATLAB interfaces to Python image processing and computer vision models from GitHub repositories or pip-installable packages using MPyReq. Use when asked to interface MATLAB with a Python CV/image model (segmentation, depth estimation, object detection, image generation, super-resolution, etc.), given a GitHub repo URL for an image/vision model, or asked to create an MPyReq demo for a deep-learning vision pipeline. Do NOT use for general-purpose Python-MATLAB interfacing, non-vision models (NLP, tabular, audio), model deployment/serving, or MATLAB-only image processing workflows.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.7 KB |
| manifest.yaml | config | 535 B |
| references/common_gotchas.md | markdown | 1.8 KB |
| references/demo-birefnet.md | markdown | 2.0 KB |
| references/demo-cellpose.md | markdown | 839 B |
| references/demo-depthpro.md | markdown | 1.8 KB |
| references/demo-sam2.md | markdown | 2.2 KB |
| references/demo-stardist.md | markdown | 2.8 KB |
| references/demo-vggt.md | markdown | 2.2 KB |
| references/image_conversion_patterns.md | markdown | 3.1 KB |
| references/python_matlab_conversions.md | markdown | 1.5 KB |
| references/readme.md | markdown | 2.3 KB |
references/readme.md
View on GitHub# MPyReq: MATLAB-Based Python Requirements Manager
## Overview
MPyReq is a MATLAB-based tool designed to simplify Python environment management for MATLAB projects. It simplifies installing and configuring Python environments for MATLAB projects by handling version management, package installation, Git repository cloning, and model file downloads through a streamlined API.
## Key Features
- **Python Version Management**: Specify and manage specific Python versions
- **Package Installation**: Install pip packages with dependency resolution
- **Git Integration**: Clone repositories directly
- **Model Downloads**: Fetch pre-trained models and weights
- **Environment Caching**: Maintain consistent configurations across sessions
- **Runtime Setup**: Automatic initialization on subsequent runs
## Setup Instructions
Users must first configure the installation directory:
```matlab
MPyReq.setInstallFolder(largeSSDFolder)
```
This one-time setup should point to a fast storage device (SSD recommended) with approximately 15+ GB available space, as the tool downloads substantial libraries and model files.
## Basic Usage
```matlab
% Initial setup with Python version and package
MPyReq.python("3.12");
MPyReq.pipPackage("cellpose");
% Access Python functionality
model = py.cellpose.models.CellposeModel(gpu=true);
outputs = model.eval(im);
```
## Example Workflows
The package includes demonstration scripts for:
- **demoCellpose**: Cell segmentation using Cellpose
- **demoStarDist**: Object detection with star-convex shapes
- **demoDepthPro**: Monocular depth estimation
- **demoSAM2**: Segment Anything Model 2
- **demoVGGT**: Visual Geometry Grounded Transformer
- **demoBiRefNet**: Bilateral reference segmentation
## Important Considerations
**Environment Conflicts**: The tool does not automatically resolve package version conflicts. When switching between projects with incompatible requirements, users should reset the environment:
```matlab
terminate(pyenv); clear MPyReq
```
**Platform Support**: Compatible with R2019b and later on Windows, macOS, and Linux. GPU-enabled PyTorch on Windows requires additional configuration via environment variables.
## Documentation
Access full documentation via `help MPyReq.m` in MATLAB.
----
Copyright 2026 The MathWorks, Inc.
----
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |