Skip to content
No description, website, or topics provided.
Python Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
arch Fix typo in README and cleanup model definition Sep 3, 2019
cityscapesScripts @ 878f1d0
results Initial commit Aug 29, 2019
LICENSE Add MIT licence Aug 30, 2019 Update the capitalization in the README Sep 10, 2019 Initial commit Aug 29, 2019 Cleanup Aug 31, 2019 Fix typo in README and cleanup model definition Sep 3, 2019

SqueezeNAS: Fast Neural Architecture Search for Faster Semantic Segmentation

This repository contains the trained deep neural network architectures and weights as well as evaluation code for the SqueezeNAS paper.

If you find this useful, or if you use it in your commercial work, please cite:

    author = {Albert Shaw and Daniel Hunter and Forrest Iandola and Sammy Sidhu},
    title = {{SqueezeNAS}: Fast Neural Architecture Search for Faster Semantic Segmentation},
    booktitle = {ICCV Neural Architects Workshop},
    year = {2019}


Python >= 3.7.0
PyTorch >= 1.0.1
torchvision >= 0.2.2
tabulate == 0.8.3
numpy >= 1.15.4

Cityscapes Dataset

The dataset can be downloaded from the cityscapes website.

  1. Extract the annotations and copy the gtFine directory to data/gtFine.
  2. Extract the left camera images and copy the leftImg8bit directory to data/leftImg8bit.


  1. Install the required packages.
  2. Clone this repository.
  3. Download and extract the Cityscapes dataset to the data folder as described above.
  4. Initialize the cityscapesScripts submodule: git submodule init && git submodule update.

(Alternatively download a zip of the cityscapesScripts repo and extract the cityscapesscripts folder to cityscapesScripts/cityscapesscripts.)


Use the script to evaluate the models. Results are saved into the results folder.

To evaluate the squeezenas_lat_small network, run:
python3 --net squeezenas_lat_small

By default the networks are evaluated using the GPU. Use the --use_cpu option to evaluate only on CPU.
python3 --net squeezenas_lat_small --use_cpu

The other networks can be evaluated by running the specifying the other networks for the --net option.

bash will evaluate all the models.

There is some minor variation to results reported in the paper which is the maximum validation accuracy chosen from the last 20 epochs of training due to the models which were saved.

Expected results:

Name classIOU categoryIOU GigaMACs
squeezenas_lat_small 0.6801 0.8413 4.47
squeezenas_lat_large 0.7351 0.8658 19.57
squeezenas_lat_xlarge 0.7506 0.8728 32.73
squeezenas_mac_small 0.6677 0.8394 3.01
squeezenas_mac_large 0.7240 0.8618 9.39
squeezenas_mac_xlarge 0.7462 0.8700 21.84 command line options uses a command line interface. For help, please run: python3 --help

The following flags are available:

-h, --help            show this help message and exit
-v, --verbose         if this option is supplied, a full layer by layer
                      GigaMAC summary of the model will be printed. If this
                      option is not supplied, only the total GigaMACs will
                      be printed.
-m, --only_macs       if this option is supplied, no inference is run, only
                      MAC count is printed.
-c, --use_cpu         If this option supplied, the network will be evaluated
                      using the cpu. Otherwise the gpu will be used to run
--net {squeezenas_lat_large,squeezenas_lat_small,squeezenas_lat_xlarge,squeezenas_mac_large,
You can’t perform that action at this time.