Refactor face nvinfer
This commit is contained in:
parent
760b162301
commit
6522fbd46e
@ -1268,7 +1268,6 @@ GstPadProbeReturn FaceNvInferServerManager::sgie_pad_buffer_probe(
|
||||
if (!batch_meta) return GST_PAD_PROBE_OK;
|
||||
bool is_zero_embedding_vector = false;
|
||||
// bool current_full_frame_is_captured = false;
|
||||
bool find_body = false;
|
||||
|
||||
/* Iterate each frame metadata in batch */
|
||||
for (NvDsMetaList *l_frame = batch_meta->frame_meta_list; l_frame != NULL;
|
||||
@ -1495,29 +1494,20 @@ GstPadProbeReturn FaceNvInferServerManager::sgie_pad_buffer_probe(
|
||||
// // collect all body objects
|
||||
// auto body_map = collect_body_objects(frame_meta);
|
||||
// // encode body corresponding to this object
|
||||
find_body = false;
|
||||
auto it = body_map.find(obj_meta->object_id);
|
||||
if (it != body_map.end()) {
|
||||
NvDsObjectMeta *body_meta = it->second;
|
||||
encode_objects_attach_meta(ctx, ip_surf, frame_meta,
|
||||
body_meta);
|
||||
find_body = true;
|
||||
encode_full_frame_attach_meta(ctx, ip_surf, frame_meta);
|
||||
encode_objects_attach_meta(ctx, ip_surf, frame_meta,
|
||||
final_face_obj);
|
||||
} else {
|
||||
// body object not found for this object_id
|
||||
// std::cout << "No body object found for object_id
|
||||
// = " << obj_meta->object_id << std::endl;
|
||||
}
|
||||
|
||||
if (find_body == true) {
|
||||
// if (current_full_frame_is_captured == false) {
|
||||
// current_full_frame_is_captured = true;
|
||||
// }
|
||||
encode_full_frame_attach_meta(ctx, ip_surf, frame_meta);
|
||||
|
||||
encode_objects_attach_meta(ctx, ip_surf, frame_meta,
|
||||
final_face_obj);
|
||||
}
|
||||
|
||||
// adding embedding vector to final_face_obj as user_meta
|
||||
NvDsUserMeta *user_meta_embedding_vector =
|
||||
nvds_acquire_user_meta_from_pool(batch_meta);
|
||||
|
||||
@ -26,7 +26,7 @@ class FaceNvInferServerManager {
|
||||
static std::vector<FACE_BODY> face_body_list;
|
||||
GstElement *face_detector = NULL;
|
||||
int face_batch_size;
|
||||
inline static constexpr bool save_img = TRUE;
|
||||
inline static constexpr bool save_img = FALSE; // TRUE;
|
||||
inline static constexpr bool attach_user_meta = TRUE;
|
||||
inline static float compression_coefficient;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user