인원/차량 수 분석 가이드

콘솔의 인원/차량 수 분석 모델 카드

점유 분석 모델을 사용하면 동영상 프레임에 추가한 특정 입력값을 토대로 사람 또는 차량을 집계할 수 있습니다. 사람 및 차량 감지기 모델과 비교하여, 숙박 인원 분석 모델에는 고급 기능이 제공됩니다. 이러한 기능은 활동 감지 구역 집계, 선 교차 집계, 거주 감지입니다.

  • 활성 영역을 사용하면 사용자가 특정 사용자 정의 영역에서 사람 또는 차량을 집계할 수 있습니다.
  • 선 교차는 객체가 특정 선을 교차하는 방향을 계산하는 기능을 제공합니다.
  • 체류 시간 감지는 활성 영역을 기반으로 하며 물체가 최소 시간 동안 영역에 머물렀는지 여부를 감지하는 기능을 제공합니다.

이 모델은 동영상 스트림을 입력으로 받아 각 프레임에서 감지된 사람 및 차량 수를 포함하는 프로토콜 버퍼를 출력합니다. 모델은 6FPS로 실행됩니다.

사용 사례: 스마트 시티 트래픽 분석

다음 동영상에서는 Vertex AI Vision을 사용하여 점유 분석 애플리케이션을 만들고 빌드하고 배포하는 방법을 보여줍니다.

이 애플리케이션은 사용자가 Google Cloud 콘솔에서 지정한 교차로에서 선을 교차하는 자동차 수를 집계하는 모델을 사용합니다. 또한 애플리케이션은 사람 흐리게 처리 모델을 사용하여 동영상 피드 소스에 표시되는 모든 사용자의 신원을 보호합니다.

애플리케이션은 분석된 데이터를 미디어 저장을 위해 Vertex AI Vision의 Media Warehouse로 전송하고 구조화된 데이터를 테이블에 저장하기 위해 BigQuery로 전송합니다. 창고를 사용하면 차량 수나 사람 수와 같은 모델의 기준에 따라 저장된 데이터를 검색할 수 있습니다. BigQuery의 테이블 데이터를 사용하면 분석 정보를 위해 데이터를 쿼리할 수 있습니다.

모델 출력

사람 및 차량 감지에는 현재 처리된 프레임에서 감지된 사람 및 차량 수가 표시됩니다. 개수 유형은 사용자가 제공한 주석 입력을 기반으로 합니다. 원시 감지 및 추적 결과도 출력에 포함됩니다. 다음은 프로세서 출력의 프로토콜 버퍼 정의입니다. 출력 스트림의 빈도는 일정하며 초당 3프레임입니다.

// The prediction result proto for Person/Vehicle Detection.
message OccupancyCountingPredictionResult {

 // Current timestamp.
 google.protobuf.Timestamp current_time = 1;

 // The entity info for annotations from the processor.
 message Entity {
   // Label id.
   int64 label_id = 1;
   // Human readable string of the label.
   string label_string = 2;
 }

 // Identified box contains location and the entity of the object.
 message IdentifiedBox {
   // An unique id for this box.
   int64 box_id = 1;
   // Bounding Box in the normalized coordinates.
   message NormalizedBoundingBox {
     // Min in x coordinate.
     float xmin = 1;
     // Min in y coordinate.
     float ymin = 2;
     // Width of the bounding box.
     float width = 3;
     // Height of the bounding box.
     float height = 4;
   }

   // Bounding Box in the normalized coordinates.
   NormalizedBoundingBox normalized_bounding_box = 2;

   // Confidence score associated with this box.
   float score = 3;

   // Entity of this box.
   Entity entity = 4;

   // A unique id to identify a track. It must be consistent across frames.
   // It only exists if tracking is enabled.
   int64 track_id = 5;
 }

 // A list of identified boxes.
 repeated IdentifiedBox identified_boxes = 2;

 // The statistics info for annotations from the processor.
 message Stats {
   // The object info and count for annotations from the processor.
   message ObjectCount {
     // Entity of this object.
     Entity entity = 1;
     // Count of the object.
     int32 count = 2;
   }

   // Counts of the full frame.
   repeated ObjectCount full_frame_count = 1;

   // Message for Crossing line count.
   message CrossingLineCount {
     // Line annotation from the user.
     StreamAnnotation annotation = 1;
     // The direction that follows the right hand rule.
     repeated ObjectCount positive_direction_counts = 2;
     // The direction that is opposite to the right hand rule.
     repeated ObjectCount negative_direction_counts = 3;
   }

   // Crossing line counts.
   repeated CrossingLineCount crossing_line_counts = 2;

   // Message for the active zone count.
   message ActiveZoneCount {
     // Active zone annotation from the user.
     StreamAnnotation annotation = 1;
     // Counts in the zone.
     repeated ObjectCount counts = 2;
   }

   // Active zone counts.
   repeated ActiveZoneCount active_zone_counts = 3;
 }

 // Detection statistics.
 Stats stats = 3;

 // The track info for annotations from the processor.
 message TrackInfo {
   // A unique id to identify a track. It must be consistent across frames.
   string track_id = 1;
   // Start timestamp of this track.
   google.protobuf.Timestamp start_time = 2;
 }

 // The dwell time info for annotations from the processor.
 message DwellTimeInfo {
   // A unique id to identify a track. It must be consistent across frames.
   string track_id = 1;
   // The unique id for the zone in which the object is dwelling/waiting.
   string zone_id = 2;
   // The beginning time when a dwelling object has been identified in a zone.
   google.protobuf.Timestamp dwell_start_time = 3;
   // The end time when a dwelling object has exited in a zone.
   google.protobuf.Timestamp dwell_end_time = 4;
 }

 // Track related information. All the tracks that are live at this timestamp.
 // It only exists if tracking is enabled.
 repeated TrackInfo track_info = 4;

 // Dwell time related information. All the tracks that are live in a given
 // zone with a start and end dwell time timestamp
 repeated DwellTimeInfo dwell_time_info = 5;
}

권장사항 및 제한사항

  • 사람과 차량이 표준 또는 일반적인 시점과 다르게 보이는 비정상적인 카메라 관점 (예: 위에서 아래로 보는 시점)을 피하세요. 감지 품질은 비정상적인 조회수의 영향을 크게 받을 수 있습니다.
  • 사람과 차량이 완전히 또는 대부분 보이도록 합니다. 감지 품질은 다른 물체에 의한 부분적인 가림의 영향을 받을 수 있습니다.
  • 사람 및 차량 감지기에는 감지 가능한 최소 객체 크기가 있습니다. 이 크기는 카메라 뷰 크기의 약 2% 입니다. 타겟팅하는 사람과 차량이 카메라에서 너무 멀리 있지 않은지 확인합니다. 이러한 키 객체의 표시 가능한 크기는 충분히 커야 합니다.
  • 관심 장소에 적절한 조명이 있어야 합니다.
  • 동영상 소스 카메라 렌즈가 깨끗한지 확인합니다.
  • 사람 또는 자동차가 아닌 항목이 카메라 시야를 가리지 않도록 합니다.
  • 다음과 같은 요인으로 인해 모델의 성능이 저하될 수 있습니다. 데이터 소스를 찾을 때 다음 요소를 고려하세요.
    • 조명이 좋지 않음
    • 혼잡도 및 객체 가림
    • 흔하지 않거나 흔하지 않은 관점
    • 작은 객체 크기