Skip to content

Commit

Permalink
V0.06.alpha (#262)
Browse files Browse the repository at this point in the history
* Upgrade to DS 5.O

* Reference new DS 5.0 engine files

* Bump version to v0.06.alpha
  • Loading branch information
rjhowell44 authored Jul 1, 2020
1 parent ef0dda0 commit c598100
Show file tree
Hide file tree
Showing 41 changed files with 147 additions and 171 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ CXX = g++

TARGET_DEVICE = $(shell gcc -dumpmachine | cut -f1 -d -)

DSL_VERSION:='L"v0.05.alpha"'
NVDS_VERSION:=4.0
DSL_VERSION:='L"v0.06.alpha"'
NVDS_VERSION:=5.0
GS_VERSION:=1.0
GLIB_VERSION:=2.0
GSTREAMER_VERSION:=1.0
CUDA_VERSION:=10.0
CUDA_VERSION:=10.2

SRC_INSTALL_DIR?=/opt/nvidia/deepstream/deepstream-$(NVDS_VERSION)/sources
INC_INSTALL_DIR?=/opt/nvidia/deepstream/deepstream-$(NVDS_VERSION)/sources/includes
Expand Down
62 changes: 0 additions & 62 deletions dsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1295,58 +1295,6 @@ def dsl_osd_crop_settings_set(name, left, top, width, height):
result = _dsl.dsl_osd_crop_settings_set(name, left, top, width, height)
return int(result)

##
## dsl_osd_redaction_enabled_get()
##
_dsl.dsl_osd_redaction_enabled_get.argtypes = [c_wchar_p, POINTER(c_bool)]
_dsl.dsl_osd_redaction_enabled_get.restype = c_uint
def dsl_osd_redaction_enabled_get(name):
global _dsl
enabled = c_bool(False)
result = _dsl.dsl_osd_redaction_enabled_get(name, DSL_BOOL_P(enabled))
return int(result), enabled.value

##
## dsl_osd_redaction_enabled_set()
##
_dsl.dsl_osd_redaction_enabled_set.argtypes = [c_wchar_p, c_bool]
_dsl.dsl_osd_redaction_enabled_set.restype = c_uint
def dsl_osd_redaction_enabled_set(name, enabled):
global _dsl
result = _dsl.dsl_osd_redaction_enabled_set(name, enabled)
return int(result)

##
## dsl_osd_redaction_enabled_get()
##
_dsl.dsl_osd_redaction_enabled_get.argtypes = [c_wchar_p, POINTER(c_bool)]
_dsl.dsl_osd_redaction_enabled_get.restype = c_uint
def dsl_osd_redaction_enabled_get(name):
global _dsl
enabled = c_bool(False)
result = _dsl.dsl_osd_redaction_enabled_get(name, DSL_BOOL_P(enabled))
return int(result), enabled.value

##
## dsl_osd_redaction_class_add()
##
_dsl.dsl_osd_redaction_class_add.argtypes = [c_wchar_p, c_int, c_double, c_double, c_double, c_double]
_dsl.dsl_osd_redaction_class_add.restype = c_uint
def dsl_osd_redaction_class_add(name, class_id, red, green, blue, alpha):
global _dsl
result = _dsl.dsl_osd_redaction_class_add(name, class_id, red, green, blue, alpha)
return int(result)

##
## dsl_osd_redaction_class_remove()
##
_dsl.dsl_osd_redaction_class_remove.argtypes = [c_wchar_p, c_int]
_dsl.dsl_osd_redaction_class_remove.restype = c_uint
def dsl_osd_redaction_class_remove(name, class_id):
global _dsl
result = _dsl.dsl_osd_redaction_class_remove(name, class_id)
return int(result)

##
## dsl_osd_batch_meta_handler_add()
##
Expand All @@ -1368,16 +1316,6 @@ def dsl_osd_batch_meta_handler_remove(name, pad):
result = _dsl.dsl_osd_batch_meta_handler_remove(name, pad)
return int(result)

##
## dsl_osd_kitti_output_enabled_set()
##
_dsl.dsl_osd_kitti_output_enabled_set.argtypes = [c_wchar_p, c_bool, c_wchar_p]
_dsl.dsl_osd_kitti_output_enabled_set.restype = c_uint
def dsl_osd_kitti_output_enabled_set(name, enabled, path):
global _dsl
result = _dsl.dsl_osd_kitti_output_enabled_set(name, enabled, path)
return int(result)

##
## dsl_tee_demuxer_new()
##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# Filespecs for the Primary GIE
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_gpu0_fp16.engine'

def main(args):

Expand Down
2 changes: 1 addition & 1 deletion examples/python/1csi_live_pgie_tiler_osd_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# Filespecs for the Primary GIE
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_gpu0_fp16.engine'

##
# Function to be called on XWindow Delete event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@

# Filespecs for the Primary GIE
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_gpu0_fp16.engine'

# Filespecs for the Secondary GIE
sgie1_config_file = '../../test/configs/config_infer_secondary_carcolor_nano.txt'
sgie1_model_file = '../../test/models/Secondary_CarColor/resnet18.caffemodel_b1_fp16.engine'
sgie1_model_file = '../../test/models/Secondary_CarColor/resnet18.caffemodel_b1_gpu0_fp16.engine'

sgie2_config_file = '../../test/configs/config_infer_secondary_carmake_nano.txt'
sgie2_model_file = '../../test/models/Secondary_CarMake/resnet18.caffemodel_b1_fp16.engine'
sgie2_model_file = '../../test/models/Secondary_CarMake/resnet18.caffemodel_b1_gpu0_fp16.engine'

sgie3_config_file = '../../test/configs/config_infer_secondary_vehicletypes_nano.txt'
sgie3_model_file = '../../test/models/Secondary_VehicleTypes/resnet18.caffemodel_b1_fp16.engine'
sgie3_model_file = '../../test/models/Secondary_VehicleTypes/resnet18.caffemodel_b1_gpu0_fp16.engine'

##
# Function to be called on XWindow KeyRelease event
Expand Down
2 changes: 1 addition & 1 deletion examples/python/1uri_file_pgie_iou_tiler_osd_bmh_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

# Filespecs for the Primary GIE and IOU Trcaker
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b8_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_gpu0_fp16.engine'
tracker_config_file = '../../test/configs/iou_config.txt'

##
Expand Down
2 changes: 1 addition & 1 deletion examples/python/1uri_file_pgie_ktl_tiler_osd_bmh_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

# Filespecs for the Primary GIE
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_gpu0_fp16.engine'

##
# Function to be called on XWindow KeyRelease event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

# Filespecs for the Primary GIE
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_gpu0_fp16.engine'

def osd_sink_pad_buffer_probe(buffer, user_data):
frame_number = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# Filespecs for the Primary GIE
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_gpu0_fp16.engine'

source_uri = '../../test/streams/sample_1080p_h265.mp4'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# Filespecs for the Primary GIE
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_gpu0_fp16.engine'

source_uri = '../../test/streams/sample_1080p_h264.mp4'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# Filespecs for the Primary GIE
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_gpu0_fp16.engine'

source_uri = '../../test/streams/sample_1080p_h265.mp4'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# Filespecs for the Primary GIE
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_gpu0_fp16.engine'

source_uri = '../../test/streams/sample_1080p_h265.mp4'

Expand Down
2 changes: 1 addition & 1 deletion examples/python/1uri_https_tiler_window_dyn_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# Filespecs for the Primary GIE
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b1_gpu0_fp16.engine'

source_uri = 'https://www.radiantmediaplayer.com/media/bbb-360p.mp4'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# Filespecs for the Primary GIE
inferConfigFile = '../../test/configs/config_infer_primary_nano.txt'
modelEngineFile = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b8_fp16.engine'
modelEngineFile = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b2_gpu0_fp16.engine'

##
# Function to be called on XWindow Delete event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@

# Filespecs for the Primary GIE
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b2_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b2_gpu0_fp16.engine'

# Filespecs for the Secondary GIE
sgie1_config_file = '../../test/configs/config_infer_secondary_carcolor_nano.txt'
sgie1_model_file = '../../test/models/Secondary_CarColor/resnet18.caffemodel_b2_fp16.engine'
sgie1_model_file = '../../test/models/Secondary_CarColor/resnet18.caffemodel_b2_gpu0_fp16.engine'

sgie2_config_file = '../../test/configs/config_infer_secondary_carmake_nano.txt'
sgie2_model_file = '../../test/models/Secondary_CarMake/resnet18.caffemodel_b2_fp16.engine'
sgie2_model_file = '../../test/models/Secondary_CarMake/resnet18.caffemodel_b2_gpu0_fp16.engine'

sgie3_config_file = '../../test/configs/config_infer_secondary_vehicletypes_nano.txt'
sgie3_model_file = '../../test/models/Secondary_VehicleTypes/resnet18.caffemodel_b2_fp16.engine'
sgie3_model_file = '../../test/models/Secondary_VehicleTypes/resnet18.caffemodel_b2_gpu0_fp16.engine'

##
# Function to be called on XWindow KeyRelease event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# Filespecs for the Primary GIE
inferConfigFile = '../../test/configs/config_infer_primary_nano.txt'
modelEngineFile = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b8_fp16.engine'
modelEngineFile = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b2_gpu0_fp16.engine'

##
# Function to be called on XWindow Delete event
Expand Down
2 changes: 1 addition & 1 deletion examples/python/4uri_file_pgie_ktl_tiler_osd_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# Filespecs for the Primary GIE
inferConfigFile = '../../test/configs/config_infer_primary_nano.txt'
modelEngineFile = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b4_fp16.engine'
modelEngineFile = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b4_gpu0_fp16.engine'

# Function to be called on End-of-Stream (EOS) event
def eos_event_listener(client_data):
Expand Down
2 changes: 1 addition & 1 deletion examples/python/4uri_live_pgie_tiler_osd_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# Filespecs for the Primary GIE
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b8_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b4_gpu0_fp16.engine'

source_uri1 = "http://wzmedia.dot.ca.gov/D4/E580_at_Grand_Lakeshore.stream/playlist.m3u8"
source_uri2 = "http://wzmedia.dot.ca.gov/D4/E92_JWO_Foster_City_Bl.stream/playlist.m3u8"
Expand Down
2 changes: 1 addition & 1 deletion examples/python/dyn_uri_file_pgie_ktl_tiler_osd_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# Filespecs for the Primary GIE
inferConfigFile = '../../test/configs/config_infer_primary_nano.txt'
modelEngineFile = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b8_fp16.engine'
modelEngineFile = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b4_gpu0_fp16.engine'

MAX_SOURCE_COUNT = 4
cur_source_count = 0
Expand Down
2 changes: 1 addition & 1 deletion examples/python/ode_actions_on_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# Filespecs for the Primary GIE and IOU Trcaker
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b8_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b4_gpu0_fp16.engine'
tracker_config_file = '../../test/configs/iou_config.txt'

PGIE_CLASS_ID_VEHICLE = 0
Expand Down
2 changes: 1 addition & 1 deletion examples/python/ode_custom_trigger_custom_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

# Filespecs for the Primary GIE and IOU Trcaker
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b8_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b4_gpu0_fp16.engine'
tracker_config_file = '../../test/configs/iou_config.txt'

PGIE_CLASS_ID_VEHICLE = 0
Expand Down
2 changes: 1 addition & 1 deletion examples/python/ode_intersection_min_max_dimensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

# Filespecs for the Primary GIE and IOU Tracker
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b8_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b4_gpu0_fp16.engine'
tracker_config_file = '../../test/configs/iou_config.txt'

PGIE_CLASS_ID_VEHICLE = 0
Expand Down
2 changes: 1 addition & 1 deletion examples/python/ode_min_max_range_triggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# Filespecs for the Primary GIE and IOU Trcaker
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b8_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b4_gpu0_fp16.engine'
tracker_config_file = '../../test/configs/iou_config.txt'

PGIE_CLASS_ID_VEHICLE = 0
Expand Down
2 changes: 1 addition & 1 deletion examples/python/ode_occurrence_absence_interchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

# Filespecs for the Primary GIE and IOU Tracker
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b8_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b4_gpu0_fp16.engine'
tracker_config_file = '../../test/configs/iou_config.txt'

PGIE_CLASS_ID_VEHICLE = 0
Expand Down
2 changes: 1 addition & 1 deletion examples/python/ode_trigger_criteria.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

# Filespecs for the Primary GIE and IOU Tracker
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b8_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b2_gpu0_fp16.engine'
tracker_config_file = '../../test/configs/iou_config.txt'

PGIE_CLASS_ID_VEHICLE = 0
Expand Down
2 changes: 1 addition & 1 deletion examples/python/ode_triggers_areas_and_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# Filespecs for the Primary GIE and IOU Trcaker
primary_infer_config_file = '../../test/configs/config_infer_primary_nano.txt'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b8_fp16.engine'
primary_model_engine_file = '../../test/models/Primary_Detector_Nano/resnet10.caffemodel_b2_gpu0_fp16.engine'
tracker_config_file = '../../test/configs/iou_config.txt'

PGIE_CLASS_ID_VEHICLE = 0
Expand Down
8 changes: 6 additions & 2 deletions src/DslGieBintr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ namespace DSL
m_pInferEngine->SetAttribute("process-mode", m_processMode);
m_pInferEngine->SetAttribute("unique-id", m_uniqueId);
m_pInferEngine->SetAttribute("gpu-id", m_gpuId);
m_pInferEngine->SetAttribute("model-engine-file", modelEngineFile);

if (m_modelEngineFile.size())
{
m_pInferEngine->SetAttribute("model-engine-file", modelEngineFile);
}

g_object_set (m_pInferEngine->GetGstObject(),
"raw-output-generated-callback", OnRawOutputGeneratedCB,
Expand Down Expand Up @@ -252,7 +256,7 @@ namespace DSL
case INT32: typeSize = 4; break;
case INT8: typeSize = 1; break;
}
streamOutputFile.write((char*)pLayerInfo->buffer, typeSize * pLayerInfo->dims.numElements * batchSize);
streamOutputFile.write((char*)pLayerInfo->buffer, typeSize * pLayerInfo->inferDims.numElements * batchSize);
streamOutputFile.close();
}
m_rawOutputFrameNumber++;
Expand Down
9 changes: 6 additions & 3 deletions src/DslOdeAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,13 @@ namespace DSL
boolean display;

// Service will log error if Area is not found
uint left(0), top(0), width(0), height(0);
uint retval = Services::GetServices()->OdeAreaGet(m_odeArea.c_str(),
&m_rectangleParams.left, &m_rectangleParams.top,
&m_rectangleParams.width, &m_rectangleParams.height,
&display);
&left, &top, &width, &height, &display);
m_rectangleParams.left = left;
m_rectangleParams.top = top;
m_rectangleParams.width = width;
m_rectangleParams.height = height;

if ((retval != DSL_RESULT_SUCCESS) or (!display))
{
Expand Down
Loading

0 comments on commit c598100

Please sign in to comment.