Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Mit dem Modell Personen-/Fahrzeugdetektor können Sie Personen oder Fahrzeuge* in Videoframes erkennen und zählen. Das Modell nimmt einen Videostream als Eingabe entgegen und gibt einen Protokollpuffer mit der Anzahl der Personen und Fahrzeuge aus, die in jedem Frame erkannt wurden. Das Modell läuft mit 6 FPS.
* Autos, Busse, Lkw, Fahrräder, Motorräder und Krankenwagen.
Modellausgabe
Das Modell „Personen-/Fahrzeugdetektor“ zeigt die Anzahl der Personen und Fahrzeuge an, die im aktuell verarbeiteten Frame erkannt wurden. Unten finden Sie die Protokoll-Buffer-Definition der Modellausgabe.
Die Frequenz des Ausgabestreams ist konstant: ein Frame pro Sekunde.
// 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 model.
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 list of identified boxes.
repeated IdentifiedBox identified_boxes = 2;
// The statistics info for annotations from the model.
message Stats {
// The object info and count for annotations from the model.
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;
}
// Detection statistics.
Stats stats = 3;
}
Best Practices und Einschränkungen
Vermeiden Sie ungewöhnliche Kameraperspektiven (z. B. eine Vogelperspektive), bei denen Personen und Fahrzeuge anders erscheinen als bei einer Standard- oder gängigen Ansicht.
Ungewöhnliche Aufrufe können sich stark auf die Erkennungsqualität auswirken.
Achten Sie darauf, dass Personen und Fahrzeuge vollständig oder größtenteils sichtbar sind. Die Qualität der Erkennung kann durch teilweises Verdecken durch andere Objekte beeinträchtigt werden.
Der Personen-/Fahrzeugdetektor hat eine minimale Objektgröße, die erkannt werden kann. Das entspricht etwa 2% der Größe der Kameraansicht. Die Personen und Fahrzeuge, die Sie erfassen möchten, dürfen nicht zu weit von der Kamera entfernt sein. Die Sichtbarkeit dieser wichtigen Objekte muss ausreichend groß sein.
Die Bereiche von Interesse müssen ausreichend beleuchtet sein.
Achten Sie darauf, dass das Kameraobjektiv der Videoquelle sauber ist.
Achten Sie darauf, dass keine Objekte (außer Personen oder Autos) das Sichtfeld der Kamera verdecken.
Die folgenden Faktoren können die Leistung des Modells beeinträchtigen. Berücksichtigen Sie bei der Auswahl von Datenquellen die folgenden Faktoren:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[],[],null,["# Person/vehicle detector guide\n\nThe **Person/vehicle detector** model lets you detect and count people or\nvehicles^\\*^ in video frames. The model accepts a video stream as input\nand outputs a [protocol buffer](https://developers.google.com/protocol-buffers/docs/overview) with the count of detected\npeople and vehicles detected in each frame. The model runs at six FPS.\n\n^\\* Cars, buses, trucks, bicycles, motorcycles and ambulances.^\n\nModel output\n------------\n\nThe Person/vehicle detector model shows the number of people and vehicles\ndetected in the current processed frame. Below is the\n[protocol buffer](https://developers.google.com/protocol-buffers/docs/overview) definition of the model output.\nThe frequency of the output stream is constant: one frame per second. \n\n```\n// The prediction result proto for Person/Vehicle Detection.\nmessage OccupancyCountingPredictionResult {\n\n // Current timestamp.\n google.protobuf.Timestamp current_time = 1;\n\n // The entity info for annotations from the model.\n message Entity {\n // Label id.\n int64 label_id = 1;\n // Human readable string of the label.\n string label_string = 2;\n }\n\n // Identified box contains location and the entity of the object.\n message IdentifiedBox {\n // An unique id for this box.\n int64 box_id = 1;\n // Bounding Box in the normalized coordinates.\n message NormalizedBoundingBox {\n // Min in x coordinate.\n float xmin = 1;\n // Min in y coordinate.\n float ymin = 2;\n // Width of the bounding box.\n float width = 3;\n // Height of the bounding box.\n float height = 4;\n }\n // Bounding Box in the normalized coordinates.\n NormalizedBoundingBox normalized_bounding_box = 2;\n // Confidence score associated with this box.\n float score = 3;\n // Entity of this box.\n Entity entity = 4;\n }\n\n // A list of identified boxes.\n repeated IdentifiedBox identified_boxes = 2;\n\n // The statistics info for annotations from the model.\n message Stats {\n // The object info and count for annotations from the model.\n message ObjectCount {\n // Entity of this object.\n Entity entity = 1;\n // Count of the object.\n int32 count = 2;\n }\n // Counts of the full frame.\n repeated ObjectCount full_frame_count = 1;\n }\n\n // Detection statistics.\n Stats stats = 3;\n}\n```\n\nBest practices and limitations\n------------------------------\n\n- Avoid unusual camera viewpoints (for example, a top-down view) where people and vehicles appear differently from a standard or common view of them. The detection quality can be largely impacted by unusual views.\n- Ensure that people and vehicles are fully or mostly visible. The detection quality can be affected by partial occlusion by other objects.\n- The Person/vehicle detector has a minimal detectable object size. This size is approximately 2% with respect to the size of the camera view. Ensure that the target people and vehicles are not too far away from the camera. These key objects' viewable sizes must be sufficiently large.\n- Areas of interest must have proper lighting.\n- Ensure the video source camera lens is clean.\n- Ensure entities (other than people or cars) don't obstruct any part of the camera's field of view.\n- The following factors might degrade the model's performance. Consider these factors when you source data:\n - Poor lighting conditions.\n - Crowdedness and object occlusions.\n - Uncommon viewpoints.\n - Small object sizes."]]