OLD | NEW |
(Empty) | |
| 1 syntax = "proto2"; |
| 2 |
| 3 option optimize_for = LITE_RUNTIME; |
| 4 |
| 5 package mri; |
| 6 |
| 7 // The output of the media analytics process. Implicitly tied to the |
| 8 // MediaPerception dictionary defined in Chromium source at |
| 9 // src/extensions/common/api/media_perception_private.idl for the |
| 10 // Chromium mediaPerceptionPrivate API. This .proto needs to be compatible |
| 11 // with the version used in the binary checked into the Chromebox For |
| 12 // Meetings private overlay. |
| 13 // |
| 14 // This message is packaged by the graph runner when a PerceptionSample |
| 15 // or array of PerceptionSamples comes out of the graph. |
| 16 message MediaPerception { |
| 17 // The timestamp attached when this data originated from the analysis process. |
| 18 optional uint64 timestamp = 1; // In milliseconds since Epoch. |
| 19 |
| 20 // A single FramePerception message or array of perceptions (if reporting the |
| 21 // results from multiple frames). |
| 22 repeated FramePerception frame_perception = 2; |
| 23 } |
| 24 |
| 25 // Used to transmit a history of image frames and their associated annotations. |
| 26 // This is accumulated over time by the graph runner. |
| 27 message Diagnostics { |
| 28 repeated PerceptionSample perception_sample = 1; |
| 29 } |
| 30 |
| 31 message State { |
| 32 enum Status { |
| 33 STATUS_UNSPECIFIED = 0; // Unused required default value for Proto enums. |
| 34 TIMEOUT = 1; // Unable to reach media analysis process. |
| 35 UNINITIALIZED = 2; // Media analytics working on loading configuration. |
| 36 STARTED = 3; // Analysis process running but not recieving frames. |
| 37 RUNNING = 4; // Analysis process running and injesting frames. |
| 38 SUSPENDED = 5; // Media analytics process waiting to be started. |
| 39 } |
| 40 |
| 41 // Note: RUNNING and SUSPENDED are the only two states which should be sent to |
| 42 // SetState. |
| 43 optional Status status = 1; |
| 44 |
| 45 // Device context so that the media analytics process can better select the |
| 46 // right video device to open. |
| 47 optional string device_context = 2; |
| 48 } |
| 49 |
| 50 // This is the output of the MediaPerceptionSinkCalculator. |
| 51 message PerceptionSample { |
| 52 optional FramePerception frame_perception = 1; |
| 53 // The image frame data associated with the frame perception. |
| 54 optional ImageFrame image_frame = 2; |
| 55 } |
| 56 |
| 57 // This message stores the image frame along with the meta data. |
| 58 message ImageFrame { |
| 59 enum Format { |
| 60 FORMAT_UNSPECIFIED = 0; // Unused required default value for Proto enums. |
| 61 RGB = 1; // Raw rgb image. |
| 62 PNG = 2; // PNG image. |
| 63 JPEG = 3; // JPEG image. |
| 64 } |
| 65 optional int32 width = 1; |
| 66 optional int32 height = 2; |
| 67 optional Format format = 3; |
| 68 optional int32 data_length = 4; |
| 69 optional bytes pixel_data = 5; |
| 70 } |
| 71 |
| 72 // The set of computer vision metadata for an image frame. |
| 73 message FramePerception { |
| 74 optional uint64 frame_id = 1; |
| 75 |
| 76 optional uint32 frame_width_in_px = 2; |
| 77 optional uint32 frame_height_in_px = 3; |
| 78 |
| 79 // The timestamp associated with the frame (when it enters the graph). |
| 80 optional uint64 timestamp = 4; |
| 81 |
| 82 // The list of entities detected for this frame. |
| 83 repeated Entity entity = 5; |
| 84 } |
| 85 |
| 86 message Entity { |
| 87 // A unique id associated with the detected entity, which can be used to track |
| 88 // the entity over time. |
| 89 optional uint32 id = 1; |
| 90 |
| 91 enum EntityType { |
| 92 UNSPECIFIED = 0; |
| 93 FACE = 1; |
| 94 PERSON = 2; |
| 95 } |
| 96 |
| 97 optional EntityType type = 2; |
| 98 |
| 99 // Minimum box, which captures entire detected entity. |
| 100 optional BoundingBox bounding_box = 3; |
| 101 |
| 102 // A value for the quality of this detection. |
| 103 optional float confidence = 4; |
| 104 } |
| 105 |
| 106 message BoundingBox { |
| 107 // The points that define the corners of a bounding box. |
| 108 optional Point top_left = 1; |
| 109 optional Point bottom_right = 2; |
| 110 // Indicates whether or not these coordinates are normalized to values between |
| 111 // 0 and 1. |
| 112 optional bool normalized = 3 [default = false]; |
| 113 } |
| 114 |
| 115 message Point { |
| 116 // x represents the horizontal distance from the top left corner of the image |
| 117 // to the point. |
| 118 optional float x = 1; |
| 119 // y represents the vertical distance from the top left corner of the image to |
| 120 // the point. |
| 121 optional float y = 2; |
| 122 } |
OLD | NEW |