Spritea / STC-Seg

Solve the Puzzle of Instance Segmentation in Videos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

STC-Seg

Solve the Puzzle of Instance Segmentation in Videos.

Dependencies

  • Python 3.7
  • Pytorch 1.4
  • Detectron2 (9eb4831)
  • torchvision, opencv, cudatoolkit

This repo was tested with Python 3.7.10, PyTorch 1.4.0, cuDNN 7.6, and CUDA 10.0. But it should be runnable with more recent PyTorch>=1.4 versions.

You can use anaconda or miniconda to install those dependencies:

conda create -n STC-Seg-pytorch python=3.7 pytorch=1.4 torchvision opencv cudatoolkit=10.0
conda activate STC-Seg-pytorch

Use the git clone command to download Detectron2 source code from the official github repository. Then switch the Detectron2 into the old version with commit id 9eb4831 and install it:

cd detectron2
git checkout -f 9eb4831
cd ..
python -m pip install -e detectron2

More details please see docs/Install_Detectron2.md.

Installation

Please build the STC-Seg with:

cd STC-Seg
python setup.py build develop

If any error occurs in STC-Seg installation, please remove the build folder before restart.

Inference

  1. Please run this script to get the trained STC-Seg models:
python tools/download_models.py
  1. Please download examples of video frame sequences:
python tools/download_examples.py
  1. Run the demo with those examples (under inputs folder):
bash run.sh inputs
  1. Results will be saved under results folder.

About

Solve the Puzzle of Instance Segmentation in Videos

License:MIT License


Languages

Language:Python 84.3%Language:Cuda 9.2%Language:C++ 6.4%Language:Shell 0.1%