YACWC
This commit is contained in:
@@ -178,7 +178,7 @@ def embed_results_probe(pad, info, u_data, list_add, frame_num=0):
|
||||
if True:
|
||||
for i in range(tensor_meta.num_output_layers):
|
||||
layer = pyds.get_nvds_LayerInfo(tensor_meta, i)
|
||||
if layer.layerName == "embedding":
|
||||
if layer.layerName == "output":
|
||||
|
||||
ptr = ctypes.cast(
|
||||
pyds.get_ptr(layer.buffer), ctypes.POINTER(ctypes.c_float)
|
||||
@@ -395,8 +395,8 @@ if True:
|
||||
streammux_embed.set_property("width", target_width_embed)
|
||||
streammux_embed.set_property("height", target_height_embed)
|
||||
streammux_embed.set_property("batched-push-timeout", MUXER_BATCH_TIMEOUT_USEC)
|
||||
streammux_embed.set_property("enable-padding", 1)
|
||||
streammux_embed.set_property("batch-size", 4)
|
||||
streammux_embed.set_property("enable-padding", 0)
|
||||
streammux_embed.set_property("batch-size", 1)
|
||||
|
||||
nugget_embed = Gst.ElementFactory.make("nvinfer", "primary-inference")
|
||||
nugget_embed.set_property(
|
||||
@@ -426,7 +426,7 @@ if True:
|
||||
# capsfilter.link(tee)
|
||||
nvvidconv.link(tee)
|
||||
|
||||
if True:
|
||||
if False:
|
||||
pipeline.add(queue_detect)
|
||||
pipeline.add(streammux_detect)
|
||||
pipeline.add(nugget_detector)
|
||||
@@ -442,7 +442,7 @@ if True:
|
||||
os.environ["GST_DEBUG_DUMP_DOT_DIR"] = "/tmp"
|
||||
os.putenv("GST_DEBUG_DUMP_DIR_DIR", "/tmp")
|
||||
|
||||
if False:
|
||||
if True:
|
||||
|
||||
pipeline.add(queue_embed)
|
||||
pipeline.add(streammux_embed)
|
||||
@@ -522,7 +522,13 @@ if True:
|
||||
pass
|
||||
# cleanup
|
||||
pipeline.set_state(Gst.State.NULL)
|
||||
# return detector_list, embed_list
|
||||
|
||||
# return detector_list, embed_list\\
|
||||
out = [detector_list, embed_list ]
|
||||
import json
|
||||
with open("dump.json", "w") as ff:
|
||||
json.dump([out[0], out[1]], ff)
|
||||
sys.exit()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
@@ -537,6 +543,3 @@ if __name__ == "__main__":
|
||||
|
||||
import json
|
||||
|
||||
with open("dump.json", "w") as ff:
|
||||
json.dump([out[0], out[1]], ff)
|
||||
sys.exit()
|
||||
|
||||
Reference in New Issue
Block a user