Internal change
PiperOrigin-RevId: 525069421
This commit is contained in:
parent
63cd09951d
commit
b4e27c137e
|
@ -24,8 +24,8 @@ namespace mediapipe {
|
||||||
|
|
||||||
void FrameAnnotationTracker::AddDetectionResult(
|
void FrameAnnotationTracker::AddDetectionResult(
|
||||||
const FrameAnnotation& frame_annotation) {
|
const FrameAnnotation& frame_annotation) {
|
||||||
const int64 time_us =
|
const int64_t time_us =
|
||||||
static_cast<int64>(std::round(frame_annotation.timestamp()));
|
static_cast<int64_t>(std::round(frame_annotation.timestamp()));
|
||||||
for (const auto& object_annotation : frame_annotation.annotations()) {
|
for (const auto& object_annotation : frame_annotation.annotations()) {
|
||||||
detected_objects_[time_us + object_annotation.object_id()] =
|
detected_objects_[time_us + object_annotation.object_id()] =
|
||||||
object_annotation;
|
object_annotation;
|
||||||
|
@ -37,7 +37,7 @@ FrameAnnotation FrameAnnotationTracker::ConsolidateTrackingResult(
|
||||||
absl::flat_hash_set<int>* cancel_object_ids) {
|
absl::flat_hash_set<int>* cancel_object_ids) {
|
||||||
CHECK(cancel_object_ids != nullptr);
|
CHECK(cancel_object_ids != nullptr);
|
||||||
FrameAnnotation frame_annotation;
|
FrameAnnotation frame_annotation;
|
||||||
std::vector<int64> keys_to_be_deleted;
|
std::vector<int64_t> keys_to_be_deleted;
|
||||||
for (const auto& detected_obj : detected_objects_) {
|
for (const auto& detected_obj : detected_objects_) {
|
||||||
const int object_id = detected_obj.second.object_id();
|
const int object_id = detected_obj.second.object_id();
|
||||||
if (cancel_object_ids->contains(object_id)) {
|
if (cancel_object_ids->contains(object_id)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user