Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/finnickniu/torchvison_object_detection


https://github.com/finnickniu/torchvison_object_detection

Last synced: 16 days ago
JSON representation

Awesome Lists containing this project

README

        

# Torchvision Object Detection
## Install environment
1. Build conda environment

```
conda create -n demo python=3.6 -y
conda activate demo
```
2. Install pytorch

```
conda install pytorch cudatoolkit=10.0 torchvision -c pytorch

```
3. Install cocoapi
```
pip install cython
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI

```
4. Install requirement dependencies
```
pip install -r requirements.txt
```

## Run model
1. Regarding image tagging, you may need to train un-labeled image. You could use this online tagging tool (https://app.supervise.ly) to annotate image. It is easy to use, just check their turtorial.

2. Config your model
Currently, the API only supports MaskRCNN and FasterRCNN. You need to create a work_dir firstly.

Seondly, copy the config.json to your work_dir.

Thirdly, modify the parameters in the config.json.

You can choose "mask_rcnn" or "faster_rcnn" as your detection engine.
3. Train your model
```
python train.py
```
4. Visualize yout model
```
tensorboard --logdir=path to work_dir
```
5. Test your model
```
python test.py --model_path path --cuda_device cuda:1 --video_path path --score_thr 0.6
```