Stores and updates per-target ReID feature histories.
Definition at line 28 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
Public Member Functions | |
| ReIDFeatureGallery () | |
| Construct a ReIDFeatureGallery instance. More... | |
| ~ReIDFeatureGallery () | |
| Release resources owned by the ReIDFeatureGallery instance. More... | |
| void | initialize (const int reidFeatureSize, const int reidHistorySize, const uint32_t maxStreams, const int maxTargetsPerStream, const int debugVerboseLevel) |
| Allocate feature-gallery storage and initialize stream partitions. More... | |
| int | getReidFeatureIndGlobal (const NvMOTStreamId videoStreamId, uint targetInd) |
| For a new reid feature to add, determine its position in feature gallery and return the global index of that position. More... | |
| int | getReidFeatureOffset (const NvMOTStreamId videoStreamId) const |
| Get the global-gallery offset of a stream's partition. More... | |
| void | remove (const NvMOTStreamId videoStreamId, const std::vector< int > &reidFeatureInds) |
| Remove reid feature of given indices. More... | |
| void | removeStream (const NvMOTStreamId videoStreamId) |
| Remove a stream's all reid features. More... | |
| bool | updateReIDFeature (const NvMOTStreamId videoStreamId, const DetectedObjInfo *detObj, const std::shared_ptr< NvTrackedObject > target) |
| Update reid feature gallery and each target's record. More... | |
| void | removeStreamReIDFeature (const NvMOTStreamId videoStreamId) |
| Remove reid feature gallery and each target's record. More... | |
| void | removeTrackerReIDFeature (const NvMOTStreamId videoStreamId, const std::shared_ptr< NvTrackedObject > target) |
| Remove a target's reid features from the gallery. More... | |
| void | fuseReidFeatureInd (const NvMOTStreamId videoStreamId, uint targetIndKept, uint targetIndFused) |
| Merge fused targets' reid features into its peer. More... | |
| const int | getLastInd (const NvMOTStreamId streamId) const |
| Get the last feature gallery index in use for a stream. More... | |
| const float * | getReIDFeaturePtrs (const NvMOTStreamId streamId) const |
| Get the device pointer to a stream's feature gallery partition. More... | |
| float * | getFirstReIDFeaturePtrs () |
| Get the start of the complete feature gallery. More... | |
| const int | getReIDHistorySize () const |
| Get the configured per-target feature history size. More... | |
| const std::vector< int > & | getTargetReIDFeatureInds (uint targetInd) const |
| Get the gallery feature indices retained for a target. More... | |
| const int | getTargetReIDFeatureNextInd (uint targetInd) const |
| Get the next circular-history slot for a target. More... | |
| void | resetTargetReIDFeatureInds (uint targetInd) |
| Reset the feature indices retained for a target. More... | |
| void | updateTargetReIDFeatureInd (uint targetInd, int featureInd) |
| Record a feature index for a target. More... | |
| void | printFeatureInds (uint targetInd) const |
| Print the feature indices retained for a target. More... | |
| ReIDFeatureGallery () | |
| Construct a ReIDFeatureGallery instance. More... | |
| ~ReIDFeatureGallery () | |
| Release resources owned by the ReIDFeatureGallery instance. More... | |
| void | initialize (const int reidFeatureSize, const int reidHistorySize, const uint32_t maxStreams, const int maxTargetsPerStream, const int debugVerboseLevel) |
| Allocate feature-gallery storage and initialize stream partitions. More... | |
| int | getReidFeatureIndGlobal (const NvMOTStreamId videoStreamId, uint targetInd) |
| For a new reid feature to add, determine its position in feature gallery and return the global index of that position. More... | |
| int | getReidFeatureOffset (const NvMOTStreamId videoStreamId) const |
| Get the global-gallery offset of a stream's partition. More... | |
| void | remove (const NvMOTStreamId videoStreamId, const std::vector< int > &reidFeatureInds) |
| Remove reid feature of given indices. More... | |
| void | removeStream (const NvMOTStreamId videoStreamId) |
| Remove a stream's all reid features. More... | |
| bool | updateReIDFeature (const NvMOTStreamId videoStreamId, const DetectedObjInfo *detObj, const std::shared_ptr< NvTrackedObject > target) |
| Update reid feature gallery and each target's record. More... | |
| void | removeStreamReIDFeature (const NvMOTStreamId videoStreamId) |
| Remove reid feature gallery and each target's record. More... | |
| void | removeTrackerReIDFeature (const NvMOTStreamId videoStreamId, const std::shared_ptr< NvTrackedObject > target) |
| Remove a target's reid features from the gallery. More... | |
| void | fuseReidFeatureInd (const NvMOTStreamId videoStreamId, uint targetIndKept, uint targetIndFused) |
| Merge fused targets' reid features into its peer. More... | |
| const int | getLastInd (const NvMOTStreamId streamId) const |
| Get the last feature gallery index in use for a stream. More... | |
| const float * | getReIDFeaturePtrs (const NvMOTStreamId streamId) const |
| Get the device pointer to a stream's feature gallery partition. More... | |
| float * | getFirstReIDFeaturePtrs () |
| Get the start of the complete feature gallery. More... | |
| const int | getReIDHistorySize () const |
| Get the configured per-target feature history size. More... | |
| const std::vector< int > & | getTargetReIDFeatureInds (uint targetInd) const |
| Get the gallery feature indices retained for a target. More... | |
| const int | getTargetReIDFeatureNextInd (uint targetInd) const |
| Get the next circular-history slot for a target. More... | |
| void | resetTargetReIDFeatureInds (uint targetInd) |
| Reset the feature indices retained for a target. More... | |
| void | updateTargetReIDFeatureInd (uint targetInd, int featureInd) |
| Record a feature index for a target. More... | |
| void | printFeatureInds (uint targetInd) const |
| Print the feature indices retained for a target. More... | |
Protected Attributes | |
| int | m_debugVerboseLevel |
| Debug message verbose mode level. More... | |
| int | m_maxTargetsPerStream |
| Max targets per stream. More... | |
| int | m_reidHistorySize |
| Max number of reid features per object. More... | |
| int | m_reidFeatureSize |
| Size of each reid feature. More... | |
| std::map< NvMOTStreamId, int > | m_reidFeatureOffsets |
| Reid feature gallery indices being used by each stream, {streamID, ptr}. More... | |
| std::deque< int > | m_reidFeatureOffsetsInPool |
| Reid feature pointers in pool when unused. More... | |
| std::map< NvMOTStreamId, std::set< int > > | m_reidFeatureIndsInPool |
| Feature gallery indices in pool. More... | |
| std::map< NvMOTStreamId, int > | m_lastInds |
| Index of last feature gallery being used in each stream. More... | |
| std::map< uint, std::vector< int > > | m_reidFeatureIndsTargets |
| Each target's reid feature indices. More... | |
| std::map< uint, uint > | m_reidFeatureNextIndTargets |
| Each target's next circular-history slot for a reid feature. More... | |
| float * | m_reidFeatureGallery_d |
| float * | m_reidFeatureGallery_h |
| CUDA array saving target features in past frames. More... | |
| cudaStream_t | m_cuStream |
| CUDA stream. More... | |
| bool | m_isInit |
| If initialized. More... | |
| ReIDFeatureGallery::ReIDFeatureGallery | ( | ) |
Construct a ReIDFeatureGallery instance.
| ReIDFeatureGallery::~ReIDFeatureGallery | ( | ) |
Release resources owned by the ReIDFeatureGallery instance.
| ReIDFeatureGallery::ReIDFeatureGallery | ( | ) |
Construct a ReIDFeatureGallery instance.
| ReIDFeatureGallery::~ReIDFeatureGallery | ( | ) |
Release resources owned by the ReIDFeatureGallery instance.
| void ReIDFeatureGallery::fuseReidFeatureInd | ( | const NvMOTStreamId | videoStreamId, |
| uint | targetIndKept, | ||
| uint | targetIndFused | ||
| ) |
Merge fused targets' reid features into its peer.
| [in] | videoStreamId | Video stream identifier. |
| [in] | targetIndKept | Index of the target that keeps the merged features. |
| [in] | targetIndFused | Index of the target whose features are merged into the kept target. |
| void ReIDFeatureGallery::fuseReidFeatureInd | ( | const NvMOTStreamId | videoStreamId, |
| uint | targetIndKept, | ||
| uint | targetIndFused | ||
| ) |
Merge fused targets' reid features into its peer.
| [in] | videoStreamId | Video stream identifier. |
| [in] | targetIndKept | Index of the target that keeps the merged features. |
| [in] | targetIndFused | Index of the target whose features are merged into the kept target. |
|
inline |
Get the start of the complete feature gallery.
Definition at line 128 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidFeatureGallery_d.
|
inline |
Get the start of the complete feature gallery.
Definition at line 128 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidFeatureGallery_d.
| const int ReIDFeatureGallery::getLastInd | ( | const NvMOTStreamId | streamId | ) | const |
Get the last feature gallery index in use for a stream.
| [in] | streamId | Video stream identifier. |
| const int ReIDFeatureGallery::getLastInd | ( | const NvMOTStreamId | streamId | ) | const |
Get the last feature gallery index in use for a stream.
| [in] | streamId | Video stream identifier. |
| int ReIDFeatureGallery::getReidFeatureIndGlobal | ( | const NvMOTStreamId | videoStreamId, |
| uint | targetInd | ||
| ) |
For a new reid feature to add, determine its position in feature gallery and return the global index of that position.
| [in] | videoStreamId | Video stream identifier. |
| [in] | targetInd | Index of the target that receives the feature. |
| int ReIDFeatureGallery::getReidFeatureIndGlobal | ( | const NvMOTStreamId | videoStreamId, |
| uint | targetInd | ||
| ) |
For a new reid feature to add, determine its position in feature gallery and return the global index of that position.
| [in] | videoStreamId | Video stream identifier. |
| [in] | targetInd | Index of the target that receives the feature. |
|
inline |
Get the global-gallery offset of a stream's partition.
| [in] | videoStreamId | Video stream id. |
Definition at line 63 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidFeatureOffsets.
|
inline |
Get the global-gallery offset of a stream's partition.
| [in] | videoStreamId | Video stream id. |
Definition at line 63 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidFeatureOffsets.
| const float* ReIDFeatureGallery::getReIDFeaturePtrs | ( | const NvMOTStreamId | streamId | ) | const |
Get the device pointer to a stream's feature gallery partition.
| [in] | streamId | Video stream identifier. |
| const float* ReIDFeatureGallery::getReIDFeaturePtrs | ( | const NvMOTStreamId | streamId | ) | const |
Get the device pointer to a stream's feature gallery partition.
| [in] | streamId | Video stream identifier. |
|
inline |
Get the configured per-target feature history size.
Definition at line 131 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidHistorySize.
|
inline |
Get the configured per-target feature history size.
Definition at line 131 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidHistorySize.
|
inline |
Get the gallery feature indices retained for a target.
| [in] | targetInd | Target index. |
Definition at line 137 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidFeatureIndsTargets.
|
inline |
Get the gallery feature indices retained for a target.
| [in] | targetInd | Target index. |
Definition at line 137 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidFeatureIndsTargets.
|
inline |
Get the next circular-history slot for a target.
| [in] | targetInd | Target index. |
Definition at line 146 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidFeatureNextIndTargets.
|
inline |
Get the next circular-history slot for a target.
| [in] | targetInd | Target index. |
Definition at line 146 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidFeatureNextIndTargets.
| void ReIDFeatureGallery::initialize | ( | const int | reidFeatureSize, |
| const int | reidHistorySize, | ||
| const uint32_t | maxStreams, | ||
| const int | maxTargetsPerStream, | ||
| const int | debugVerboseLevel | ||
| ) |
Allocate feature-gallery storage and initialize stream partitions.
| void ReIDFeatureGallery::initialize | ( | const int | reidFeatureSize, |
| const int | reidHistorySize, | ||
| const uint32_t | maxStreams, | ||
| const int | maxTargetsPerStream, | ||
| const int | debugVerboseLevel | ||
| ) |
Allocate feature-gallery storage and initialize stream partitions.
|
inline |
Print the feature indices retained for a target.
| [in] | targetInd | Target index. |
Definition at line 180 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidFeatureIndsTargets.
|
inline |
Print the feature indices retained for a target.
| [in] | targetInd | Target index. |
Definition at line 180 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidFeatureIndsTargets.
| void ReIDFeatureGallery::remove | ( | const NvMOTStreamId | videoStreamId, |
| const std::vector< int > & | reidFeatureInds | ||
| ) |
Remove reid feature of given indices.
| [in] | videoStreamId | Video stream identifier. |
| [in] | reidFeatureInds | Indices of the features to remove. |
| void ReIDFeatureGallery::remove | ( | const NvMOTStreamId | videoStreamId, |
| const std::vector< int > & | reidFeatureInds | ||
| ) |
Remove reid feature of given indices.
| [in] | videoStreamId | Video stream identifier. |
| [in] | reidFeatureInds | Indices of the features to remove. |
| void ReIDFeatureGallery::removeStream | ( | const NvMOTStreamId | videoStreamId | ) |
Remove a stream's all reid features.
| [in] | videoStreamId | Video stream id. |
| void ReIDFeatureGallery::removeStream | ( | const NvMOTStreamId | videoStreamId | ) |
Remove a stream's all reid features.
| [in] | videoStreamId | Video stream id. |
| void ReIDFeatureGallery::removeStreamReIDFeature | ( | const NvMOTStreamId | videoStreamId | ) |
Remove reid feature gallery and each target's record.
| [in] | videoStreamId | Video stream id. |
| void ReIDFeatureGallery::removeStreamReIDFeature | ( | const NvMOTStreamId | videoStreamId | ) |
Remove reid feature gallery and each target's record.
| [in] | videoStreamId | Video stream id. |
| void ReIDFeatureGallery::removeTrackerReIDFeature | ( | const NvMOTStreamId | videoStreamId, |
| const std::shared_ptr< NvTrackedObject > | target | ||
| ) |
Remove a target's reid features from the gallery.
| [in] | videoStreamId | Video stream id. |
| [in] | target | Tracker associated with the detection. |
| void ReIDFeatureGallery::removeTrackerReIDFeature | ( | const NvMOTStreamId | videoStreamId, |
| const std::shared_ptr< NvTrackedObject > | target | ||
| ) |
Remove a target's reid features from the gallery.
| [in] | videoStreamId | Video stream id. |
| [in] | target | Tracker associated with the detection. |
|
inline |
Reset the feature indices retained for a target.
| [in] | targetInd | Target index. |
Definition at line 155 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidFeatureIndsTargets, and m_reidFeatureNextIndTargets.
|
inline |
Reset the feature indices retained for a target.
| [in] | targetInd | Target index. |
Definition at line 155 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidFeatureIndsTargets, and m_reidFeatureNextIndTargets.
| bool ReIDFeatureGallery::updateReIDFeature | ( | const NvMOTStreamId | videoStreamId, |
| const DetectedObjInfo * | detObj, | ||
| const std::shared_ptr< NvTrackedObject > | target | ||
| ) |
Update reid feature gallery and each target's record.
| [in] | videoStreamId | Video stream id. |
| [in] | detObj | Detection that provides the new feature. |
| [in] | target | The target associated with this detection. |
| bool ReIDFeatureGallery::updateReIDFeature | ( | const NvMOTStreamId | videoStreamId, |
| const DetectedObjInfo * | detObj, | ||
| const std::shared_ptr< NvTrackedObject > | target | ||
| ) |
Update reid feature gallery and each target's record.
| [in] | videoStreamId | Video stream id. |
| [in] | detObj | Detection that provides the new feature. |
| [in] | target | The target associated with this detection. |
|
inline |
Record a feature index for a target.
| [in] | targetInd | Target index. |
| [in] | featureInd | Gallery feature index to retain for the target. |
Definition at line 166 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidFeatureIndsTargets, m_reidFeatureNextIndTargets, and m_reidHistorySize.
|
inline |
Record a feature index for a target.
| [in] | targetInd | Target index. |
| [in] | featureInd | Gallery feature index to retain for the target. |
Definition at line 166 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
References m_reidFeatureIndsTargets, m_reidFeatureNextIndTargets, and m_reidHistorySize.
|
protected |
CUDA stream.
Definition at line 208 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
|
protected |
Debug message verbose mode level.
Definition at line 197 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
|
protected |
If initialized.
Definition at line 209 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
|
protected |
Index of last feature gallery being used in each stream.
Definition at line 204 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
|
protected |
Max targets per stream.
Definition at line 198 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
|
protected |
Definition at line 207 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
Referenced by getFirstReIDFeaturePtrs().
|
protected |
CUDA array saving target features in past frames.
Definition at line 207 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
|
protected |
Feature gallery indices in pool.
Definition at line 203 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
|
protected |
Each target's reid feature indices.
Definition at line 205 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
Referenced by getTargetReIDFeatureInds(), printFeatureInds(), resetTargetReIDFeatureInds(), and updateTargetReIDFeatureInd().
Each target's next circular-history slot for a reid feature.
Definition at line 206 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
Referenced by getTargetReIDFeatureNextInd(), resetTargetReIDFeatureInds(), and updateTargetReIDFeatureInd().
|
protected |
Reid feature gallery indices being used by each stream, {streamID, ptr}.
Definition at line 201 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
Referenced by getReidFeatureOffset().
|
protected |
Reid feature pointers in pool when unused.
Definition at line 202 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
|
protected |
Size of each reid feature.
Definition at line 200 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
|
protected |
Max number of reid features per object.
Definition at line 199 of file sources/libs/nvmultiobjecttracker/include/modules/ReID/ReIDFeatureGallery.hpp.
Referenced by getReIDHistorySize(), and updateTargetReIDFeatureInd().