Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp/KeywordTagging/plugin-files/descriptor/descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"value": "REGION"
},
{
"name": "OUTPUT_MERGE_WITH_PREVIOUS_TASK",
"name": "IS_ANNOTATOR",
"value": "TRUE"
}
]
Expand All @@ -79,7 +79,7 @@
"value": "REGION"
},
{
"name": "OUTPUT_MERGE_WITH_PREVIOUS_TASK",
"name": "IS_ANNOTATOR",
"value": "TRUE"
},
{
Expand Down
14 changes: 7 additions & 7 deletions cpp/OcvDnnDetection/OcvDnnDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ std::vector<MPFVideoTrack> OcvDnnDetection::GetDetections(const MPFVideoJob &job

std::vector<MPFVideoTrack> tracks = getDetections(job, feedForwardTracker);

bool output_merge_with_previous_task =
DetectionComponentUtils::GetProperty(job.job_properties, "OUTPUT_MERGE_WITH_PREVIOUS_TASK", false);
bool is_annotator =
DetectionComponentUtils::GetProperty(job.job_properties, "IS_ANNOTATOR", false);

for (MPFVideoTrack &track : tracks) {
// Update track props with feed-forward props
Expand All @@ -200,7 +200,7 @@ std::vector<MPFVideoTrack> OcvDnnDetection::GetDetections(const MPFVideoJob &job
track_props.insert(feed_forward_track_prop);
}
// Determine if we should copy feed-forward confidence
if (output_merge_with_previous_task) {
if (is_annotator) {
track.confidence = job.feed_forward_track.confidence;
}
// Update location props with corresponding feed-forward props
Expand All @@ -214,7 +214,7 @@ std::vector<MPFVideoTrack> OcvDnnDetection::GetDetections(const MPFVideoJob &job
loc_props.insert(feed_forward_prop);
}
// Determine if we should copy feed-forward confidence
if (output_merge_with_previous_task) {
if (is_annotator) {
pair.second.confidence = feed_forward_loc_iter->second.confidence;
}
}
Expand Down Expand Up @@ -290,8 +290,8 @@ std::vector<MPFImageLocation> OcvDnnDetection::GetDetections(const MPFImageJob &
}

if (job.has_feed_forward_location) {
bool output_merge_with_previous_task =
DetectionComponentUtils::GetProperty(job.job_properties, "OUTPUT_MERGE_WITH_PREVIOUS_TASK", false);
bool is_annotator =
DetectionComponentUtils::GetProperty(job.job_properties, "IS_ANNOTATOR", false);

// Update location props with feed-forward props
const Properties &feed_forward_props = job.feed_forward_location.detection_properties;
Expand All @@ -301,7 +301,7 @@ std::vector<MPFImageLocation> OcvDnnDetection::GetDetections(const MPFImageJob &
props.insert(feed_forward_prop);
}
// Determine if we should copy feed-forward confidence
if (output_merge_with_previous_task) {
if (is_annotator) {
location.confidence = job.feed_forward_location.confidence;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"value": "REGION"
},
{
"name": "OUTPUT_MERGE_WITH_PREVIOUS_TASK",
"name": "IS_ANNOTATOR",
"value": "TRUE"
}
]
Expand All @@ -79,7 +79,7 @@
"value": "REGION"
},
{
"name": "OUTPUT_MERGE_WITH_PREVIOUS_TASK",
"name": "IS_ANNOTATOR",
"value": "FALSE"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"value": "REGION"
},
{
"name": "OUTPUT_MERGE_WITH_PREVIOUS_TASK",
"name": "IS_ANNOTATOR",
"value": "TRUE"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"value": "REGION"
},
{
"name": "OUTPUT_MERGE_WITH_PREVIOUS_TASK",
"name": "IS_ANNOTATOR",
"value": "TRUE"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"value": "REGION"
},
{
"name": "OUTPUT_MERGE_WITH_PREVIOUS_TASK",
"name": "IS_ANNOTATOR",
"value": "TRUE"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"value": "REGION"
},
{
"name": "OUTPUT_MERGE_WITH_PREVIOUS_TASK",
"name": "IS_ANNOTATOR",
"value": "TRUE"
}
]
Expand Down