Skip to content

Commit

Permalink
Merge pull request ifzhang#191 from callmesora/deepstream-6-update
Browse files Browse the repository at this point in the history
Byte Deepstream 6 update - Integration
  • Loading branch information
ifzhang authored Jun 21, 2022
2 parents 2c082be + b43bae9 commit cebffc8
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ python3 tools/demo_track.py video -f exps/example/mot/yolox_x_mix_det.py -c pret
2. [TensorRT in Python](./deploy/TensorRT/python)
3. [TensorRT in C++](./deploy/TensorRT/cpp)
4. [ncnn in C++](./deploy/ncnn/cpp)
5. [Deepstream](./deploy/DeepStream)

## Citation

Expand Down
28 changes: 26 additions & 2 deletions deploy/DeepStream/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Byte-Track Integration with Deepstream
Integrating Byte-Track C++ code with the Deepstream-5.1
Integrating Byte-Track C++ code with the Deepstream-6.

## Build Instructions
```
Expand All @@ -10,7 +10,31 @@ $cmake ..
$make ByteTracker
```

This will create lib/libByteTracker.so file which can be passed as the custom low level tracker library to deepstream.
This will create ./lib/libByteTracker.so file which can be passed as the custom low level tracker library to deepstream.
To do so just add it to the folder
```
/opt/nvidia/deepstream/deepstream/lib/
```

In your deepstream_app_config.txt add the tracker.
```
[tracker]
enable=1
tracker-width=640
tracker-height=384
gpu-id=0
ll-lib-file=//opt/nvidia/deepstream/deepstream/lib/libByteTracker.so
enable-batch-process=1
```

<img src="/deploy/DeepStream/images/deepstream-pic.png" width="600"/>


## Trying out Multiple Detectors
Feel free to try multiple detectors. You can do this by using https://github.com/marcoslucianops/DeepStream-Yolo

Now adding the tracker lines in the config file you should get your tracker working.


## References
1. [How to Implement a Custom Low-Level Tracker Library in Deepstream](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvtracker.html#how-to-implement-a-custom-low-level-tracker-library)
Expand Down
Binary file added deploy/DeepStream/images/deepstream-pic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions deploy/DeepStream/src/Tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ NvMOTStatus NvMOT_Query(uint16_t customConfigFilePathSize,
pQuery->memType = NVBUF_MEM_CUDA_DEVICE;
#endif

pQuery->supportBatchProcessing = false; // set NvMOTBatchMode_Batch if the low-level tracker supports batch processing mode. Otherwise, NvMOTBatchMode_NonBatch
pQuery->batchMode = NvMOTBatchMode_NonBatch; // set NvMOTBatchMode_Batch if the low-level tracker supports batch processing mode. Otherwise, NvMOTBatchMode_NonBatch
pQuery->supportPastFrame = false; // set true if the low-level tracker supports the past-frame data or not

/**
Expand Down Expand Up @@ -68,6 +68,6 @@ NvMOTStatus NvMOT_Process(NvMOTContextHandle contextHandle,
return NvMOTStatus_OK;
}

void NvMOT_RemoveStreams(NvMOTContextHandle contextHandle, NvMOTStreamId streamIdMask) {

NvMOTStatus NvMOT_RemoveStreams(NvMOTContextHandle contextHandle, NvMOTStreamId streamIdMask) {
return contextHandle -> removeStream(streamIdMask);
}

0 comments on commit cebffc8

Please sign in to comment.