Skip to content

zaka-ai/ds_example2_classification_problem

Repository files navigation

# Changes in the files
This is the same deepstream-test2 example found in /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-test2 with some modifications. 
These include printing the classification details of the sgie inferences on the primary detected object. 
In addition, we had to add some plugins to produce a mp4 output.

in the issue.png, a sample output is shown as some classifications exit for some objects only but not all of them. 
In addition some frames contain objects with no classification output 

----------------------------------------------------------------------------

*****************************************************************************
* Copyright (c) 2018 NVIDIA Corporation.  All rights reserved.
*
* NVIDIA Corporation and its licensors retain all intellectual property
* and proprietary rights in and to this software, related documentation
* and any modifications thereto.  Any use, reproduction, disclosure or
* distribution of this software and related documentation without an express
* license agreement from NVIDIA Corporation is strictly prohibited.
*****************************************************************************

Prequisites:

Please follow instructions in the apps/sample_apps/deepstream-app/README on how
to install the prequisites for Deepstream SDK, the DeepStream SDK itself and the
apps.

You must have the following development packages installed
   GStreamer-1.0
   GStreamer-1.0 Base Plugins
   GStreamer-1.0 gstrtspserver
   X11 client-side library

To install these packages, execute the following command:
   sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev \
   libgstrtspserver-1.0-dev libx11-dev

Compilation Steps:
  $ cd apps/deepstream-test2/
  $ make
  $ ./deepstream-test2-app <h264_elementary_stream>

This document shall describe about the sample deepstream-test2 application.

It is meant for simple demonstration of how to use the various DeepStream SDK
elements in the pipeline and extract meaningful insights from a video stream.

This sample creates multiple instances of "nvinfer" element. Each instance of
the "nvinfer" uses TensorRT API to infer on frames/objects. Every
instance is configured through its respective config file. Using a correct
configuration for a nvinfer element instance is therefore very important as
considerable behaviors of the instance are parameterized through these configs.

For reference, here are the config files used for this sample :
1. The 4-class detector (referred to as pgie in this sample) uses
    dstest2_pgie_config.txt
2. The vehicle color classifier (referred to as sgie1 in this sample) uses
    dstest2_sgie1_config.txt
3. The vehicle make classifier (referred to as sgie2 in this sample) uses
    dstest2_sgie2_config.txt
4. The vehicle type classifier (referred to as sgie3 in this sample) uses
    dstest2_sgie3_config.txt
5. The tracker (referred to as nvtracker in this sample) uses
    dstest2_tracker_config.txt

In this sample, we first create one instance of "nvinfer", referred as the pgie.
This is our 4 class detector and it detects for "Vehicle , RoadSign, TwoWheeler,
Person". After this we link a "nvtracker" instance which tracks the objects
detected by the pgie. After this we create 3 more instances of "nvinfer"
referred to as sgie1, sgie2, sgie3 respectively.
Each of the nvinfer elements attach some MetaData to the buffer. By attaching
the probe function at the end of the pipeline, one can extract meaningful
information from these inferences. Please refer the "osd_sink_pad_buffer_probe"
function in the sample code. For details on the Metadata format, refer to the
file "gstnvdsmeta.h"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published