What problem does it solve?
Calling Python-based image processing and computer vision models from MATLAB normally requires manual environment setup, dependency resolution, and tedious tensor format conversions. This Skill automates the creation of MATLAB interfaces to PyTorch vision models from GitHub repositories or pip packages using the MPyReq framework.
Core Features & Use Cases
- Automated Environment Setup: Generates MPyReq setup scripts that install the correct Python version, pip packages, git repositories, and model weights.
- Python-to-MATLAB Translation: Converts Python inference code into idiomatic MATLAB, handling NCHW-to-HWC tensor reordering, bounding box format conversion, and context manager replacements.
- Verified Execution: Tests generated scripts through the MATLAB MCP server with up to 5 fix-and-retry attempts, then delivers a structured handoff if issues remain.
- Use Case: Given the GitHub URL for a segmentation model like SAM2 or BiRefNet, the Skill produces a tested demo<ModelName>.m script that downloads weights, runs inference on a MATLAB-loaded image, and visualizes the mask.
Quick Start
Ask your AI agent to create a MATLAB interface to a vision model by providing its GitHub repository URL, for example: create an MPyReq demo that runs the DepthPro depth estimation model from MATLAB.