Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/finnickniu/torchvison_object_detection
https://github.com/finnickniu/torchvison_object_detection
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/finnickniu/torchvison_object_detection
- Owner: finnickniu
- Created: 2020-09-23T06:30:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-23T06:33:43.000Z (over 4 years ago)
- Last Synced: 2024-10-30T08:37:31.687Z (2 months ago)
- Language: Python
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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
```