Git Product home page Git Product logo

detectron2_learn's Introduction

detectron2_learn

Environment

Item Content
OS Ubuntu18.04
Nvidia-driver 450.102.04
Cuda 10.1
Cudnn 7.6.5.32

Detectron2 安装方法

install torch

conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.1 -c pytorch

install detectron

python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.6/index.html

install dependency

pip install opencv-python
pip install labelme

为jupyter notebook创建kernel

pip install ipykernel
# create ipykernel env
python -m ipykernel install --user --name detectron2

Project

Workpieces

该project中示例了如何使用detectron2进行基于coco的目标检测。

1.首先使用labelme打标签

将生成的文件按照该目录所示的方式进行布置。

├── DIR
│  ├── images
│  │  ├── 1.jpg
│  │  ├── ...
│  │  ├── *.jpg
│  ├── 1.json
│  ├── ...
└──└── *.json

2.将多个COCO格式的json文件合成一个文件

在本示例中,将合成的json文件命名为trainval.json。

labelme2coco_object_detection.ipynb 用于在labelme中标记为rectangle的标签文件进行合并。

3.训练

在合成标签后,使用train_test.ipynb进行训练。

需要修改以下变量:

project 项目的名称

yaml_file yaml文件的位置

weights 所选择的模型文件

4.测试(cam)

在本示例中,使用网络相机进行测试。该方法改自于detectron2demo.py

Toy_workpiece

1.首先使用labelme打标签

将生成的文件按照该目录所示的方式进行布置。

├── DIR
│  ├── images
│  │  ├── 1.jpg
│  │  ├── ...
│  │  ├── *.jpg
│  ├── 1.json
│  ├── ...
└──└── *.json

2.将多个COCO格式的json文件合成一个文件

在本示例中,将合成的json文件命名为trainval.json。

labelme2coco_instance.ipynb 用于在labelme中标记为polygons的标签文件进行合并。

3.训练

在合成标签后,使用train_test.ipynb进行训练。

需要修改以下变量:

project 项目的名称

yaml_file yaml文件的位置

weights 所选择的模型文件

4.测试(cam)

在本示例中,使用网络相机进行测试。该方法改自于detectron2demo.py

detectron2_learn's People

Contributors

kkkkkaiai avatar

Watchers

 avatar  avatar

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.