Skip to content

Interface for analytics storage #29

@mats-claassen

Description

@mats-claassen

I thought about an interface for analytics storage. The main Logger class would obtain these values and send them to whichever concrete logger, which will be responsible for saving it in some supported format (csv, protobuf, JSON, etc) following this spec:

  • Version
  • Timestamp
  • Number of detections
  • List of detections:
    • Position (x, y, z)
    • Optional:
      • Wearing face mask
      • BBox (Xmin, Ymin, Xmax, Ymax)
      • Id (Movement Tracking)
      • Orientation (needs pose detection)
      • Body Pose keypoints (needs pose detection)

An efficient way of storing this would be using something like protobufs for example. Here I show an example in JSON to see how it could look:
Example:

{
   "version": "1.0",
   "timestamp": "2020-07-08T13:36:53+0000",
   "detection_number": 1,
   "detections": [
      {
         "position": [2.32, 3.10, 0.24], // x,y,z
         "face_mask": true,
         "tracking_id": 3241,
         "bbox": [23, 50, 120, 80], // pixel values of box
         "orientation": 60, // degrees, explained below
         "keypoints": [
            [2.32, 3.02, 0.24], // x,y,z of each point
            "..."
         ]
      }
   ]
}

For both position and orientation we could define a line through the middle of the image which serves as z axis as well as orientation 0 (if the person looks into the camera). Orientation would mean degrees from that line to the right from the person’s perspective. Could be in radians as well.

Float values could be saved with a precision of 0.1 or 0.01.

Any comments and suggestions are welcome. What do you think @mhejrati ?

Metadata

Metadata

Assignees

Labels

RFCRequest for comments

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions