资源算法 detectron2-pipeline

detectron2-pipeline

2020-03-05 | |  103 |   0 |   0

Detectron2 pipeline

Modular image processing pipeline using OpenCV and Python generators powered by Detectron2.

For detailed description how to construct image processing pipeline using OpenCV and Python generators read the following Medium stories in order:

Setup environment

This project is using Conda for project environment management.

Setup the project environment:

$ conda env create -f environment.yml
$ conda activate detectron2-pipeline

or update the environment if you git pull the repo previously:

$ conda env update -f environment.yml

Install Detectron2 in a folder one level above the detectron2-pipeline project folder

$ cd ..
$ git clone https://github.com/facebookresearch/detectron2.git
$ cd detectron2
$ git checkout 3def12bdeaacd35c6f7b3b6c0097b7bc31f31ba4
$ python setup.py build develop

We checkout 3def12bdeaacd35c6f7b3b6c0097b7bc31f31ba4 commit to ensure that you can use the code out of the box with this repo.

If you got any problems with Detectron2 installation please refer to INSTALL.md.

Demo

Run the command to execute inferences on images from the selected folder:

$ python process_images.py -i assets/images/friends -p

By default the instance segmentation model is used from configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml. You can try other models with --config-file option, for example:

$ python process_images.py -i assets/images/friends -p --config-file configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_3x.yaml

For video processing run:

$ python process_video.py -i assets/videos/walk.small.mp4 -p -d -ov walk.small.mp4

Tests

pytest is used as a test framework. All tests are stored in tests folder. Run the tests:

$ pytest

Resources and Credits

License

MIT License


上一篇:Detectron.pytorch

下一篇: vovnet-detectron2

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...