{"library":"mmsegmentation","title":"MMSegmentation","description":"MMSegmentation is an open-source semantic segmentation toolbox based on PyTorch, part of the OpenMMLab project. It provides a unified framework for training, testing, and deploying segmentation models, supporting a wide range of architectures (e.g., DeepLabV3+, PSPNet, U-Net) and datasets. Current version is 1.2.2 (Dec 2023), with a major v1.0.0 release marking a structural overhaul from v0.x. Release cadence is irregular, with minor patches every few months.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install mmsegmentation==1.2.2"],"cli":{"name":"mim","version":"sh: 1: mim: not found"}},"imports":["from mmseg.apis import MMSegInferencer","from mmseg.apis import init_model","from mmseg.apis import inference_model"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from mmseg.apis import MMSegInferencer\nimport os\n\n# Initialize the inferencer with a pretrained model\ninferencer = MMSegInferencer(\n    model='deeplabv3plus_r18-d8_4xb2-80k_cityscapes-512x1024',\n    device='cuda' if os.environ.get('CUDA_VISIBLE_DEVICES') else 'cpu'\n)\n\n# Run inference on an image\nresult = inferencer('demo/demo.png')\nprint(result['predictions'].shape)\n","lang":"python","description":"Perform semantic segmentation inference using the high-level inferencer API.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}