Snake - Code for "Deep Snake for Real-Time Instance Segmentation" CVPR 2020 oral

Related tags

Game Developmentsnake
Overview

Good news! Snake algorithms exhibit state-of-the-art performances on COCO dataset: DANCE

Deep Snake for Real-Time Instance Segmentation

city

Deep Snake for Real-Time Instance Segmentation
Sida Peng, Wen Jiang, Huaijin Pi, Xiuli Li, Hujun Bao, Xiaowei Zhou
CVPR 2020 oral

Any questions or discussions are welcomed!

Installation

Please see INSTALL.md.

Testing

Testing on Cityscapes

  1. Download the pretrained model here and put it to $ROOT/data/model/rcnn_snake/long_rcnn/197.pth.
  2. Test:
    # use coco evaluator
    python run.py --type evaluate --cfg_file configs/city_rcnn_snake.yaml
    # use the cityscapes official evaluator
    python run.py --type evaluate --cfg_file configs/city_rcnn_snake.yaml test.dataset CityscapesVal
    
  3. Speed:
    python run.py --type network --cfg_file configs/city_rcnn_snake.yaml
    

Testing on Kitti

  1. Download the pretrained model here and put it to $ROOT/data/model/snake/kins/149.pth.
  2. Test:
    python run.py --type evaluate --cfg_file configs/kins_snake.yaml test.dataset KinsVal
    
  3. Speed:
    python run.py --type network --cfg_file configs/kins_snake.yaml test.dataset KinsVal
    

Testing on Sbd

  1. Download the pretrained model here and put it to $ROOT/data/model/snake/sbd/149.pth.
  2. Test:
    python run.py --type evaluate --cfg_file configs/sbd_snake.yaml test.dataset SbdVal
    
  3. Speed:
    python run.py --type network --cfg_file configs/sbd_snake.yaml test.dataset SbdVal
    

Visualization

Visualization on Cityscapes

  1. Download the pretrained model here and put it to $ROOT/data/model/rcnn_snake/long_rcnn/197.pth.
  2. Visualize:
    # Visualize Cityscapes test set
    python run.py --type visualize --cfg_file configs/city_rcnn_snake.yaml test.dataset CityscapesTest ct_score 0.3
    # Visualize Cityscapes val set
    python run.py --type visualize --cfg_file configs/city_rcnn_snake.yaml test.dataset CityscapesVal ct_score 0.3
    

If setup correctly, the output will look like

vis_city

Visualization on Kitti

  1. Download the pretrained model here and put it to $ROOT/data/model/snake/kins/149.pth.
  2. Visualize:
    python run.py --type visualize --cfg_file configs/kins_snake.yaml test.dataset KinsVal ct_score 0.3
    

Visualization on Sbd

  1. Download the pretrained model here and put it to $ROOT/data/model/snake/sbd/149.pth.
  2. Visualize:
    python run.py --type visualize --cfg_file configs/sbd_snake.yaml test.dataset SbdVal ct_score 0.3
    

Demo

We support demo for image and image folder using python run.py --type demo --cfg_file /path/to/yaml_file demo_path /path/to/image ct_score 0.3.

For example:

python run.py --type demo --cfg_file configs/sbd_snake.yaml demo_path demo_images ct_score 0.3
# or
python run.py --type demo --cfg_file configs/sbd_snake.yaml demo_path demo_images/2009_000871.jpg ct_score 0.3

If setup correctly, the output will look like

demo

Training

The training parameters can be found in project_structure.md.

Training on Cityscapes

Two-stage training:

  1. Train the detector:
    python train_net.py --cfg_file configs/city_ct_rcnn.yaml model rcnn_det
    
  2. Train the detector and snake together:
    python train_net.py --cfg_file configs/city_rcnn_snake.yaml model rcnn_snake det_model rcnn_det
    

Training on Kins

python train_net.py --cfg_file configs/kins_snake.yaml model kins_snake

Training on Sbd

python train_net.py --cfg_file configs/sbd_snake.yaml model sbd_snake

Tensorboard

We provide tensorboard for seeing the training status:

# for the rcnn_snake task
tensorboard --logdir data/record/rcnn_snake
# for the snake task
tensorboard --logdir data/record/snake

If setup correctly, the output will look like

tensorboard

Citation

If you find this code useful for your research, please use the following BibTeX entry.

@inproceedings{peng2020deep,
  title={Deep Snake for Real-Time Instance Segmentation},
  author={Peng, Sida and Jiang, Wen and Pi, Huaijin and Li, Xiuli and Bao, Hujun and Zhou, Xiaowei},
  booktitle={CVPR},
  year={2020}
}
Owner
ZJU3DV
ZJU3DV is a research group of State Key Lab of CAD&CG, Zhejiang University. We focus on the research of 3D computer vision, SLAM and AR.
ZJU3DV
Finding a method to objectively quantify skill expression in games, using reinforcement learning

Analyzing Skill Expression in Games This is a repo where I describe a method to measure the amount of skill expression games have. Table of Contents M

Marcus Chiam 4 Nov 19, 2022
WORDLE Helper and Solver

WORDLE Helper and Solver There is a pupular game around WORDLE The game could be hard for non-English speaking people so I started to think of a helpe

1 Jan 24, 2022
A comprehensive, feature-rich, open source, and portable, collection of Solitaire games.

PySol Fan Club edition This is an open source and portable (Windows, Linux and Mac OS X) collection of Card Solitaire/Patience games written in Python

Shlomi Fish 368 Dec 28, 2022
Automates cubemap generation for Source Engine games.

AutoCube Automates cubemap generation for Source Engine games during compile-time. Download: see the release page Installation Using with CompilePal A

5 Feb 18, 2022
Rock-Paper-Scissors - Rock Paper Scissors With Python

Rock-Paper-Scissors The familiar game of Rock, Paper, Scissors is played like th

Lateefah Ajadi 0 Jan 15, 2022
A Frogger game in Python with pygame

CrockiCrocki A personal project of a simple "game" in Python to learn Pygame and Python. Requires: pygame: In Linux: pip3 install pygame In MacOS: pip

Jorge Abreu 1 Nov 07, 2021
Frets on Fire X: a fork of Frets on Fire with many added features and capabilities

Frets on Fire X - FoFiX This is Frets on Fire X, a highly customizable rhythm game supporting many modes of guitar, bass, drum, and vocal gameplay for

FoFiX 377 Jan 02, 2023
Simple implementation of the classic Snake Game in under 100 lines of code

Snake_Game Simple python implementation of the classic Snake Game in under 100 lines of code. Printscreen of the game: Imported Libraries: random; pyg

Raffaele Fiorillo 2 Jun 13, 2022
A small game I made back in think 2011

Navi Network A small game I made back in think 2011. An online game inspired by the self-hosted nature of Minecraft, made with pygame, based on the Me

Peder Bergebakken Sundt 2 Jan 19, 2022
Average Clicker Game (AVG) is a Python made game using tkinter

Average-Clicker-Game Average Clicker Game (AVG) is a Python clicker game not made with pygame but with tkinter, it has worker, worker upgrades, times

Zacky2613 1 Dec 21, 2021
Game code for Evennia servers designed for use with ALPACASclient.

ALPACASgame Game code for Evennia servers designed for use with ALPACASclient. This code is meant to be a type of "compatability layer" between the AL

FreeDelete Software 1 Nov 07, 2021
ReplitTD - Replit Tower Defense Game

IMPORTANT: I mean no offense at all in this game, this is only based off of cycl

kokomi simp :3 3 Jun 25, 2022
This is game 2048 created with moudle of python tkinter and OOP.

Game 2048 This is game 2048 created with moudle of python tkinter and OOP. This game build on classes. For start this game run: If you have python ver

0 Nov 02, 2021
PyUnity is a Python implementation of the Unity Engine, written in C++

PyUnity is a Python implementation of the Unity Engine, written in C++. This is just a fun project and many features have been taken out to make it as easy as possible to create a scene and run it.

PyUnity 206 Jan 03, 2023
j-chess implementation in python

j-chess-client-python This repository aims to be a starting point for implementing a chess ai for the j-chess-server in python. To start, you can copy

Jonas 1 Dec 25, 2021
Find live blooket games easy with python.

Blooket-pin-finder Find live blooket games easy with python. info when you start you will see what looks like error DON'T STOP those are just the thre

Crazedpotato 1 Mar 07, 2022
offline bot for game on chrome

Бот офлайн игры браузера CHROME В автоматическом режиме запускает браузер Chrome под ОС windows, так же автоматически определяет разрешения экрана, на

Andrej Marinchenko 19 Dec 17, 2022
This is a script which can be used to autobattle, upgrade metamon, compose eggs and open eggs in metamon game.

This is a script which can be used to autobattle, upgrade metamon, compose eggs and open eggs in metamon game. The only parameters you need to input are you wallet address and sign. The sign can be o

Taxiria 37 May 11, 2022
シューティングゲームぽい?未完成ですけど

シューティングゲームぽい?未完成ですけど

kawamineka 64 Jun 25, 2022
Use different orders of N-gram model to play Hangman game.

Hangman game The Hangman game is a game whereby one person thinks of a word, which is kept secret from another person, who tries to guess the word one

ZavierYang 4 Oct 11, 2022