.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "build/examples_segmentation/demo_fcn.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_fcn.py: 1. Getting Started with FCN Pre-trained Models ============================================== This is a quick demo of using GluonCV FCN model on PASCAL VOC dataset. 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 ----------------- download the example image .. GENERATED FROM PYTHON SOURCE LINES 21-25 .. code-block:: default url = 'https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/segmentation/voc_examples/1.jpg' filename = 'example.jpg' gluoncv.utils.download(url, filename) .. rst-class:: sphx-glr-script-out Out: .. code-block:: none Downloading example.jpg from https://raw.githubusercontent.com/dmlc/web-data/master/gluoncv/segmentation/voc_examples/1.jpg... 0%| | 0/24 [00:00` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: demo_fcn.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_