Skip to main content

Object Detection and Tracking Package

Project description

Plugin package: Object Detection and Tracking (ODT)

This package includes all methods to detect and track objects within on image sequence. This repo is based and is adapted on the following repositories:

https://github.com/eriklindernoren/PyTorch-YOLOv3
https://github.com/ZQPei/deep_sort_pytorch

Package Description

PDF format: vhh_od_pdf

HTML format (only usable if repository is available in local storage): vhh_od_html

Quick Setup

This package includes a setup.py script and a requirements.txt file which are needed to install this package for custom applications. The following instructions have to be done to used this library in your own application:

Requirements:

  • Ubuntu 18.04 LTS
  • CUDA 10.1 + cuDNN
  • python version 3.6.x

We developed and tested this module with pytorch 1.8-1+cu111 and torchvision 0.9.1+cu111.

0 Environment Setup (optional)

Create a virtual environment:

  • create a folder to a specified path (e.g. /xxx/vhh_od_env/)
  • python3 -m venv /xxx/vhh_od_env/

Activate the environment:

  • source /xxx/vhh_od_env/bin/activate

1A Install using Pip

The VHH Object Detection and Tracking package is available on PyPI and can be installed via pip.

  • Update pip and setuptools (tested using pip==20.2.3 and setuptools==50.3.0)
  • pip install vhh-od

Alternatively, you can also build the package from source.

1B Install by building from Source

Checkout vhh_stc repository to a specified folder:

Install the stc package and all dependencies:

  • Update pip and setuptools (tested using pip==20.2.3 and setuptools==50.3.0)
  • Install the wheel package: pip install wheel
  • change to the root directory of the repository (includes setup.py)
  • python setup.py bdist_wheel
  • The aforementioned command should create a /dist directory containing a wheel. Install the package using python -m pip install dist/xxx.whl

NOTE: You can check the success of the installation by using the commend pip list. This command should give you a list with all installed python packages and it should include vhh-stc.

2 Install PyTorch

Install a Version of PyTorch depending on your setup. Consult the PyTorch website for detailed instructions.

3 Setup environment variables (optional)

  • source /data/dhelm/python_virtenv/vhh_od_env/bin/activate
  • export CUDA_VISIBLE_DEVICES=1
  • export PYTHONPATH=$PYTHONPATH:/XXX/vhh_od/:/XXX/vhh_od/Develop/:/XXX/vhh_od/Demo/

4 Run demo script (optional)

* Make sure to have a video (e.g vid.m4v) in the videos folder (see "PATH_VIDEOS" in the config file) and a corresponding shot type detection result (e.g. vid.csv) in the stc results folder (see "STC_RESULTS_PATH" in the config file). 
* make sure that the vhh_od directory is in your Python-Path
* Settings can be adjusted via config/config_vhh_od.yaml
* ```cd Demo```
* ```python run_od_on_single_video.py```

5 Visualization (optional)

* Make sure to have a video (e.g vid.m4v) stored in the videos folder (see "PATH_VIDEOS" in the config file) and a corresponding object detection result in the results folder (see "PATH_FINAL_RESULTS" in the config file).
* Make sure that the vhh_od directory is in your Python-Path
* Settings can be adjusted via config/vis_config.yaml
* ```python Demo/run_visualization_on_single_video.py vid.m4v```
* This will create a video with bounding boxes in the raw results folder specified in config_vhh_od.yaml

Release Generation

* Create and checkout release branch: (e.g. v1.1.0): ```git checkout -b v1.1.0```
* Update version number in setup.py
* Update Sphinx documentation and release version
* Make sure that ```pip``` and ```setuptools``` are up to date
* Install ```wheel``` and ```twine```
* Build Source Archive and Built Distribution using ```python setup.py sdist bdist_wheel```
* Upload package to PyPI using ```twine upload dist/*```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vhh_od-1.5.3.tar.gz (42.1 kB view details)

Uploaded Source

Built Distribution

vhh_od-1.5.3-py3-none-any.whl (51.4 kB view details)

Uploaded Python 3

File details

Details for the file vhh_od-1.5.3.tar.gz.

File metadata

  • Download URL: vhh_od-1.5.3.tar.gz
  • Upload date:
  • Size: 42.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for vhh_od-1.5.3.tar.gz
Algorithm Hash digest
SHA256 b21cef99734a381d6b9280ae2d4811c9a5620deed6da46119b0b5efa7af69255
MD5 ffdd0ce4db44a549c0335c0539a76293
BLAKE2b-256 602621c96210e0ad9ece08e206023432240e84bd8f0f027a338acf01b99eefca

See more details on using hashes here.

File details

Details for the file vhh_od-1.5.3-py3-none-any.whl.

File metadata

  • Download URL: vhh_od-1.5.3-py3-none-any.whl
  • Upload date:
  • Size: 51.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for vhh_od-1.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0de63a29b39bb7a723b0dd005e133eebaa3f3fb2ba161f627ffbf946eb416d3e
MD5 7ca77e84cf82f4e5f099f86d721a542c
BLAKE2b-256 c4adb2536bfd94fd4cc2cafd293a2c5ab65c1a4d70001f70c44db04badc557bb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page