CVPR2020-视频目标检测MEGA,显著提升视频目标检测效果

Memory Enhanced Global-Local Aggregation for Video Object Detection

0、Paper&Code:

论文链接:https://arxiv.org/abs/2003.12063

2020 CVPR

代码链接:https://github.com/Scalsol/mega.pytorch

1、概述

在视频物体检测任务中,由于相机失焦、物体遮挡等问题,仅基于图像的目标检测器很可能达不到令人满意的效果。针对此类问题,微软亚洲研究院提出了基于记忆增强的全局-局部整合网络(Memory Enhanced Global-Local Aggregation, MEGA),它可以在只增加非常小的计算开销的前提下,整合大量的全局信息和局部信息来辅助关键帧的检测,从而显著地提升了视频物体检测器的性能。在广泛使用的 ImageNet VID 数据集中,此方法达到了截至目前的最好结果。

2、安装

2.1 Requirements:

  • PyTorch 1.3 (1.4 may cause some errors.)
  • torchvision from master
  • cocoapi
  • yacs
  • matplotlib
  • GCC >= 4.9
  • OpenCV
  • CUDA >= 9.2

2.2 安装步骤

# first, make sure that your conda is setup properly with the right environment
# for that, check that `which conda`, `which pip` and `which python` points to the
# right path. From a clean conda env, this is what you need to do

conda create --name MEGA -y python=3.7
source activate MEGA

# this installs the right pip and dependencies for the fresh python
conda install ipython pip

# mega and coco api dependencies
pip install ninja yacs cython matplotlib tqdm opencv-python scipy

# follow PyTorch installation in https://pytorch.org/get-started/locally/
# we give the instructions for CUDA 10.0
conda install pytorch=1.3.0 torchvision cudatoolkit=10.0 -c pytorch

export INSTALL_DIR=$PWD

# install pycocotools
cd $INSTALL_DIR
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
python setup.py build_ext install

# install cityscapesScripts
cd $INSTALL_DIR
git clone https://github.com/mcordts/cityscapesScripts.git
cd cityscapesScripts/
python setup.py build_ext install

# install apex
cd $INSTALL_DIR
git clone https://github.com/NVIDIA/apex.git
cd apex
python setup.py install --cuda_ext --cpp_ext

# install PyTorch Detection
cd $INSTALL_DIR
git clone https://github.com/Scalsol/mega.pytorch.git
cd mega.pytorch

# the following will install the lib with
# symbolic links, so that you can modify
# the files if you want and won't need to
# re-build it
python setup.py build develop

pip install 'pillow<7.0.0'

unset INSTALL_DIR

# or if you are on macOS
# MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py build develop

2.3 数据准备

建议下载这个数据集合

ILSVRC2015_VID_snippets_final  8G多还可以接受

链接:https://pan.baidu.com/s/1ZaBWmoEkK2SXKi4nQ2pfcQ
提取码:niwu

注意数据目录:

./datasets/ILSVRC2015/Data/VID

2.4 权重及Demo

预训练权重百度链接:

链接:https://pan.baidu.com/s/1V9-KY1HoQlMXqZ0WtTpfzA
提取码:w16u

python demo/demo.py base configs/vid_R_101_C4_1x.yaml R_101.pth --suffix ".JPEG"\
        --visualize-path datasets/ILSVRC2015/Data/VID/val/ILSVRC2015_val_00003001 \
        --output-folder visualization 

demo 测试输出
CVPR2020-视频目标检测MEGA,显著提升视频目标检测效果_第1张图片

你可能感兴趣的:(学术Paper,计算机视觉,深度学习,人工智能)