Back to Jetson Inference

Jetson Inference: Object Tracking

docs/html/group__objectTracker.html

latest26.7 KB
Original Source

| | Jetson Inference

DNN Vision Library |

Classes | Macros

Object Tracking DNN Vision Library (jetson-inference)

Object tracking used by detectNet. More...

|

Classes

| | class | objectTracker | | | Object tracker interface. More...
| | | | class | objectTrackerIOU | | | Object tracker using Intersection-Over-Union (IOU) More...
| | |

|

Macros

| | #define | OBJECT_TRACKER_USAGE_STRING | | | Standard command-line options able to be passed to detectNet::Create()More...
| | | | #define | LOG_TRACKER "[tracker] " | | | Object tracker logging prefix. More...
| | | | #define | OBJECT_TRACKER_DEFAULT_MIN_FRAMES 3 | | | The number of re-identified frames before establishing a track. More...
| | | | #define | OBJECT_TRACKER_DEFAULT_DROP_FRAMES 15 | | | The number of consecutive lost frames after which a track is removed. More...
| | |

Detailed Description

Object tracking used by detectNet.


Class Documentation

objectTracker

| class objectTracker |

Object tracker interface.

Inheritance diagram for objectTracker:

|

Public Types

| | enum | Type { NONE, IOU, KLT } | | | Tracker type enum. More...
| | | |

Public Member Functions

| | virtual | ~objectTracker () | | | Destructor. More...
| | | | template<typename T > | | int | Process (T *image, uint32_t width, uint32_t height, detectNet::Detection *detections, int numDetections) | | | Process. More...
| | | | virtual int | Process (void *image, uint32_t width, uint32_t height, imageFormat format, detectNet::Detection *detections, int numDetections)=0 | | | Process. More...
| | | | bool | IsEnabled () const | | | IsEnabled. More...
| | | | virtual void | SetEnabled (bool enabled) | | | SetEnabled. More...
| | | | virtual Type | GetType () const =0 | | | GetType. More...
| | | | bool | IsType (Type type) const | | | IsType. More...
| | | |

Static Public Member Functions

| | static objectTracker * | Create (Type type) | | | Create a new object tracker. More...
| | | | static objectTracker * | Create (int argc, char **argv) | | | Create a new object tracker by parsing the command line. More...
| | | | static objectTracker * | Create (const commandLine &cmdLine) | | | Load a new network instance by parsing the command line. More...
| | | | static const char * | Usage () | | | Usage string for command line arguments to Create()More...
| | | | static const char * | TypeToStr (Type type) | | | Convert a Type enum to string. More...
| | | | static Type | TypeFromStr (const char *str) | | | Parse a Type enum from a string. More...
| | | |

Protected Member Functions

| | | objectTracker () | | | |

Protected Attributes

| | bool | mEnabled | | |

Member Enumeration Documentation

Type

| enum objectTracker::Type |

Tracker type enum.

Enumerator
NONE

Tracking disabled.

| | IOU |

Intersection-Over-Union (IOU) tracker.

| | KLT |

KLT tracker (only available with VPI)

|

Constructor & Destructor Documentation

~objectTracker()

|

| virtual objectTracker::~objectTracker | ( | | ) | |

| virtual |

Destructor.

objectTracker()

|

| objectTracker::objectTracker | ( | | ) | |

| protected |

Member Function Documentation

Create() [1/3]

|

| static objectTracker* objectTracker::Create | ( | const commandLine & | cmdLine | ) | |

| static |

Load a new network instance by parsing the command line.

Create() [2/3]

|

| static objectTracker* objectTracker::Create | ( | int | argc, | | | | char ** | argv | | | ) | | |

| static |

Create a new object tracker by parsing the command line.

Create() [3/3]

|

| static objectTracker* objectTracker::Create | ( | Type | type | ) | |

| static |

Create a new object tracker.

GetType()

|

| virtual Type objectTracker::GetType | ( | | ) | const |

| pure virtual |

GetType.

Implemented in objectTrackerIOU.

IsEnabled()

|

| bool objectTracker::IsEnabled | ( | | ) | const |

| inline |

IsEnabled.

IsType()

|

| bool objectTracker::IsType | ( | Type | type | ) | const |

| inline |

IsType.

Process() [1/2]

template<typename T >

|

| int objectTracker::Process | ( | T * | image, | | | | uint32_t | width, | | | | uint32_t | height, | | | | detectNet::Detection * | detections, | | | | int | numDetections | | | ) | | |

| inline |

Process.

Process() [2/2]

|

| virtual int objectTracker::Process | ( | void * | image, | | | | uint32_t | width, | | | | uint32_t | height, | | | | imageFormat | format, | | | | detectNet::Detection * | detections, | | | | int | numDetections | | | ) | | |

| pure virtual |

Process.

Implemented in objectTrackerIOU.

SetEnabled()

|

| virtual void objectTracker::SetEnabled | ( | bool | enabled | ) | |

| inlinevirtual |

SetEnabled.

TypeFromStr()

|

| static Type objectTracker::TypeFromStr | ( | const char * | str | ) | |

| static |

Parse a Type enum from a string.

TypeToStr()

|

| static const char* objectTracker::TypeToStr | ( | Type | type | ) | |

| static |

Convert a Type enum to string.

Usage()

|

| static const char* objectTracker::Usage | ( | | ) | |

| inlinestatic |

Usage string for command line arguments to Create()

Member Data Documentation

mEnabled

|

| bool objectTracker::mEnabled |

| protected |

objectTrackerIOU

| class objectTrackerIOU |

Object tracker using Intersection-Over-Union (IOU)

"High-Speed Tracking-by-Detection Without Using Image Information" http://elvera.nue.tu-berlin.de/files/1517Bochinski2017.pdf

This tracker essentially performs temporal clustering of bounding boxes without using visual information, hence it is very fast but low accuracy.

Inheritance diagram for objectTrackerIOU:

|

Public Member Functions

| | virtual | ~objectTrackerIOU () | | | Destroy. More...
| | | | uint32_t | GetMinFrames () const | | | The number of re-identified frames before before establishing a track. More...
| | | | void | SetMinFrames (uint32_t frames) | | | Set the number of re-identified frames before before establishing a track. More...
| | | | uint32_t | GetDropFrames () const | | | The number of consecutive lost frames after which a track is removed. More...
| | | | void | SetDropFrames (uint32_t frames) | | | Set the number of consecutive lost frames after which a track is removed. More...
| | | | float | GetOverlapThreshold () const | | | How much IOU overlap is required for a bounding box to be matched. More...
| | | | void | SetOverlapThreshold (float threshold) | | | Set how much IOU overlap is required for a bounding box to be matched. More...
| | | | virtual Type | GetType () const | | | | virtual int | Process (void *image, uint32_t width, uint32_t height, imageFormat format, detectNet::Detection *detections, int numDetections) | | | | Public Member Functions inherited from objectTracker | | virtual | ~objectTracker () | | | Destructor. More...
| | | | template<typename T > | | int | Process (T *image, uint32_t width, uint32_t height, detectNet::Detection *detections, int numDetections) | | | Process. More...
| | | | bool | IsEnabled () const | | | IsEnabled. More...
| | | | virtual void | SetEnabled (bool enabled) | | | SetEnabled. More...
| | | | bool | IsType (Type type) const | | | IsType. More...
| | | |

Static Public Member Functions

| | static objectTrackerIOU * | Create (uint32_t minFrames=OBJECT_TRACKER_DEFAULT_MIN_FRAMES, uint32_t dropFrames=OBJECT_TRACKER_DEFAULT_DROP_FRAMES, float overlapThreshold=OBJECT_TRACKER_DEFAULT_OVERLAP_THRESHOLD) | | | Create a new object tracker. More...
| | | | static objectTrackerIOU * | Create (int argc, char **argv) | | | Create a new object tracker by parsing the command line. More...
| | | | static objectTrackerIOU * | Create (const commandLine &cmdLine) | | | Load a new network instance by parsing the command line. More...
| | | | Static Public Member Functions inherited from objectTracker | | static objectTracker * | Create (Type type) | | | Create a new object tracker. More...
| | | | static objectTracker * | Create (int argc, char **argv) | | | Create a new object tracker by parsing the command line. More...
| | | | static objectTracker * | Create (const commandLine &cmdLine) | | | Load a new network instance by parsing the command line. More...
| | | | static const char * | Usage () | | | Usage string for command line arguments to Create()More...
| | | | static const char * | TypeToStr (Type type) | | | Convert a Type enum to string. More...
| | | | static Type | TypeFromStr (const char *str) | | | Parse a Type enum from a string. More...
| | | |

Protected Member Functions

| | | objectTrackerIOU (uint32_t minFrames, uint32_t dropFrames, float overlapThreshold) | | | | Protected Member Functions inherited from objectTracker | | | objectTracker () | | | |

Protected Attributes

| | uint32_t | mIDCount | | | | uint64_t | mFrameCount | | | | uint32_t | mMinFrames | | | | uint32_t | mDropFrames | | | | float | mOverlapThreshold | | | | std::vector< detectNet::Detection > | mTracks | | | | Protected Attributes inherited from objectTracker | | bool | mEnabled | | |

|

Additional Inherited Members

| | Public Types inherited from objectTracker | | enum | Type { NONE, IOU, KLT } | | | Tracker type enum. More...
| | |

Constructor & Destructor Documentation

~objectTrackerIOU()

|

| virtual objectTrackerIOU::~objectTrackerIOU | ( | | ) | |

| virtual |

Destroy.

objectTrackerIOU()

|

| objectTrackerIOU::objectTrackerIOU | ( | uint32_t | minFrames, | | | | uint32_t | dropFrames, | | | | float | overlapThreshold | | | ) | | |

| protected |

Member Function Documentation

Create() [1/3]

|

| static objectTrackerIOU* objectTrackerIOU::Create | ( | const commandLine & | cmdLine | ) | |

| static |

Load a new network instance by parsing the command line.

Create() [2/3]

|

| static objectTrackerIOU* objectTrackerIOU::Create | ( | int | argc, | | | | char ** | argv | | | ) | | |

| static |

Create a new object tracker by parsing the command line.

Create() [3/3]

|

| static objectTrackerIOU* objectTrackerIOU::Create | ( | uint32_t | minFrames = OBJECT_TRACKER_DEFAULT_MIN_FRAMES, | | | | uint32_t | dropFrames = OBJECT_TRACKER_DEFAULT_DROP_FRAMES, | | | | float | overlapThreshold = OBJECT_TRACKER_DEFAULT_OVERLAP_THRESHOLD | | | ) | | |

| static |

Create a new object tracker.

Parameters

| minFrames | the number of re-identified frames before before establishing a track | | dropFrames | the number of consecutive lost frames after which a track is removed |

GetDropFrames()

|

| uint32_t objectTrackerIOU::GetDropFrames | ( | | ) | const |

| inline |

The number of consecutive lost frames after which a track is removed.

GetMinFrames()

|

| uint32_t objectTrackerIOU::GetMinFrames | ( | | ) | const |

| inline |

The number of re-identified frames before before establishing a track.

GetOverlapThreshold()

|

| float objectTrackerIOU::GetOverlapThreshold | ( | | ) | const |

| inline |

How much IOU overlap is required for a bounding box to be matched.

GetType()

|

| virtual Type objectTrackerIOU::GetType | ( | | ) | const |

| inlinevirtual |

See alsoobjectTracker::GetType

Implements objectTracker.

Process()

|

| virtual int objectTrackerIOU::Process | ( | void * | image, | | | | uint32_t | width, | | | | uint32_t | height, | | | | imageFormat | format, | | | | detectNet::Detection * | detections, | | | | int | numDetections | | | ) | | |

| virtual |

See alsoobjectTracker::Process

Implements objectTracker.

SetDropFrames()

|

| void objectTrackerIOU::SetDropFrames | ( | uint32_t | frames | ) | |

| inline |

Set the number of consecutive lost frames after which a track is removed.

SetMinFrames()

|

| void objectTrackerIOU::SetMinFrames | ( | uint32_t | frames | ) | |

| inline |

Set the number of re-identified frames before before establishing a track.

SetOverlapThreshold()

|

| void objectTrackerIOU::SetOverlapThreshold | ( | float | threshold | ) | |

| inline |

Set how much IOU overlap is required for a bounding box to be matched.

Member Data Documentation

mDropFrames

|

| uint32_t objectTrackerIOU::mDropFrames |

| protected |

mFrameCount

|

| uint64_t objectTrackerIOU::mFrameCount |

| protected |

mIDCount

|

| uint32_t objectTrackerIOU::mIDCount |

| protected |

mMinFrames

|

| uint32_t objectTrackerIOU::mMinFrames |

| protected |

mOverlapThreshold

|

| float objectTrackerIOU::mOverlapThreshold |

| protected |

mTracks

|

| std::vector<detectNet::Detection> objectTrackerIOU::mTracks |

| protected |

Macro Definition Documentation

LOG_TRACKER

| #define LOG_TRACKER "[tracker] " |

Object tracker logging prefix.

OBJECT_TRACKER_DEFAULT_DROP_FRAMES

| #define OBJECT_TRACKER_DEFAULT_DROP_FRAMES 15 |

The number of consecutive lost frames after which a track is removed.

OBJECT_TRACKER_DEFAULT_MIN_FRAMES

| #define OBJECT_TRACKER_DEFAULT_MIN_FRAMES 3 |

The number of re-identified frames before establishing a track.

OBJECT_TRACKER_USAGE_STRING

| #define OBJECT_TRACKER_USAGE_STRING |

Value:

"objectTracker arguments: \n" \

" --tracking flag to enable default tracker (IOU)\n" \

" --tracker=TRACKER enable tracking with 'IOU' or 'KLT'\n" \

" --tracker-min-frames=N the number of re-identified frames for a track to be considered valid (default: 3)\n" \

" --tracker-drop-frames=N number of consecutive lost frames before a track is dropped (default: 15)\n" \

" --tracker-overlap=N how much IOU overlap is required for a bounding box to be matched (default: 0.5)\n\n" \

Standard command-line options able to be passed to detectNet::Create()

  • Generated on Tue Mar 28 2023 14:27:58 for Jetson Inference by 1.8.17