GithubHelp home page GithubHelp logo

angzz / panoptic-fpn-gluon Goto Github PK

View Code? Open in Web Editor NEW
59.0 4.0 9.0 4.47 MB

Panoptic Feature Pyramid Networks

License: Apache License 2.0

Makefile 0.02% Python 87.40% CMake 0.12% C++ 12.41% Shell 0.04%
panoptic-segmentation computer-vision deep-learning gluon-cv

panoptic-fpn-gluon's Introduction

Panoptic Feature Pyramid Networks

This is an unofficial implementation of Panoptic-FPN in a gluon-cv style, we implemented this framework in a fully Gluon API, please stay tuned!

Main Results

Cityscapes

  • panoptic_fpn_resnet50_v1b_citys
- PQ SQ RQ N
All 55.4 77.9 69.3 19
Things 52.4 78.1 66.6 8
Stuff 57.6 77.7 71.2 11

Installation

  1. Install cuda 10.0 and mxnet 1.4.0.
sudo pip3 install mxnet-cu100==1.4.0.post0
  1. Clone the code, and install gluoncv with setup.py.
cd panoptic-fpn-gluon
sudo python3 setup.py build
sudo python3 setup.py install

Preparation

Cityscapes

  1. Download Cityscapes datasets follow the official tutorials and create a soft link.
ln -s $DOWNLOAD_PATH ~/.mxnet/datasets/citys

You can also download from Cityscapes and execute the command above.

  1. Create Panoptic images for training and Inference, the code can be found here. Then execute the command below:
python3 createPanopticImgs.py --dataset-folder ~/.mxnet/datasets/citys/gtFine/ --output-folder ~/.mxnet/datasets/citys/gtFine/

Note that the correct data structure is shown below:

$ ls ~/.mxnet/datasets/citys
├── gtFine
│   ├── train/
│   ├── val/
│   ├── test/
│   ├── cityscapes_panoptic_train/
│   ├── cityscapes_panoptic_val/
│   ├── cityscapes_panoptic_test/
│   ├── cityscapes_panoptic_train.json
│   └── cityscapes_panoptic_val.json
├── leftImg8bit
│   ├── train/
│   ├── val/
│   └── test/
  1. More preparations can also refer to GluonCV.

  2. All experiments are performed on 8 * 2080ti GPU with Python3.5, cuda10.0 and cudnn7.5.0.

COCO

  • TODO

Structure

* Model : $ROOT/gluoncv/model_zoo/panoptic/
* Train & valid scripts : $ROOT/scripts/panoptic/
* Metric : $ROOT/gluoncv/utils/metric/

Training & Inference

Cityscapes

  1. Clone the training scripts here, then train panoptic_fpn_resnet50_v1b_citys with:
python3 train_panoptic_fpn.py --network resnet50_v1b --use-fpn --gpus 0,1,2,3,4,5,6,7 --num-workers 32 --log-interval 10 --save-interval 20 --val-interval 10 --epochs 700 --lr-decay-epoch 430,590 --lr-warmup 1600

Note that we follow the training settings described in original paper.

  1. Clone the validation scripts here, then validate panoptic_fpn_resnet50_v1b_citys with:
python3 eval_panoptic_fpn.py --network resnet50_v1b --gpus 0,1,2,3,4,5,6,7 --pretrained ./XXX.params

COCO

  • TODO

Reference

  • Panoptic FPN: Alexander Kirillov, Ross Girshick, Kaiming He, Piotr Dollár.
    "Panoptic Feature Pyramid Networks." CVPR (2019 oral). [paper]

panoptic-fpn-gluon's People

Contributors

angzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

panoptic-fpn-gluon's Issues

mxnet.base.MXNetError: value 0 for Parameter num_args should be greater equal to 1, in operator Concat(name="", num_args="0", dim="0")

Traceback (most recent call last):
File "train_panoptic_fpn.py", line 562, in
train(net, train_data, val_data, eval_metric, ctx, args)
File "train_panoptic_fpn.py", line 440, in train
for i, batch in enumerate(train_data):
File "/export/anaconda3/envs/Panoptic-FPN/lib/python3.5/site-packages/mxnet/gluon/data/dataloader.py", line 443, in next
batch = pickle.loads(ret.get()) if self._dataset is None else ret.get()
File "/export/anaconda3/envs/Panoptic-FPN/lib/python3.5/multiprocessing/pool.py", line 644, in get
raise self._value
mxnet.base.MXNetError: value 0 for Parameter num_args should be greater equal to 1, in operator Concat(name="", num_args="0", dim="0")

when I train panoptic_fpn , the above problem happened, I don't know how to solve it.

problem with 'current_map'

In 'train_panoptic_fpn' L522 there is a condition in which in case of its execution the dict 'result' which further is not used anywhere is filled, and in the opposite case the variable 'current_map' which arrives in function 'save_parans' is declared

Any update results?

Hi, Angzz

Many thanks to your awesome-repo and this gluon reimplementation. Are there some updated results that you can share?

Can you provide pfpn with pure resnet101 results on citys as I failed with PQ=52 ?

How to run this model on my custom dataset?

Hi! Thanks for the repo. How can I run this model on my dataset which has /train/images and /train/masks? Take these 3 pictures as an example. The first one is the image and the second one is the mask and the third one is the overlay.

a

b

c

Inference on trained model

Hi, is there any demo.py script or something related to be able to see the inference results on a new image?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.