.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "build/examples_segmentation/demo_icnet.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_build_examples_segmentation_demo_icnet.py: 7. Test with ICNet Pre-trained Models for Multi-Human Parsing ====================================== This is a quick demo of using GluonCV ICNet model for multi-human parsing on real-world images. Please follow the `installation guide <../../index.html#installation>`__ to install MXNet and GluonCV if not yet. .. GENERATED FROM PYTHON SOURCE LINES 8-16 .. code-block:: default import mxnet as mx from mxnet import image from mxnet.gluon.data.vision import transforms import gluoncv # using cpu ctx = mx.cpu(0) .. GENERATED FROM PYTHON SOURCE LINES 17-21 Prepare the image ----------------- Let's first download the example image, .. GENERATED FROM PYTHON SOURCE LINES 21-27 .. code-block:: default url = 'https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/segmentation/mhpv1_examples/1.jpg' filename = 'mhp_v1_example.jpg' gluoncv.utils.download(url, filename, True) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Downloading mhp_v1_example.jpg from https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/segmentation/mhpv1_examples/1.jpg... 0%| | 0/84 [00:00` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: demo_icnet.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_