-
Notifications
You must be signed in to change notification settings - Fork 3
Output File Format
Annotate's output is defined as a list of 2D points (i.e, Xi, Yi) to allow for any polygon representation. The annotations are stored in a text file with the format:
frameN: X1, Y1, X2, Y2, ... , Xn, Yn
where Xi and Yi are the coordinates of corner i of the polygon in frame N, the N-th row in the text file. In case of multiple annotations in a single frame a '|' character will be use as separator:
frameN: X11, Y11, X12, Y12, ... , X1n, Y1n | X21, Y21, X22, Y22, ... , X2n, Y2n | X31, Y31, X32, Y32, ... , X3n, Y3n
where Xyi and Xyi are the coordinates of corner i of the polygon y in frame N.
The amount of points are defined by the type of annotations used in the sequence.
You can also choose XML format as output format. The XML format take reference from ViPER XML. The format can be shown as:
<?xml version="1.0" encoding="utf-8"?>
<video totalPeopleAmount="2">
<frame frameNumber="[frameNumber]">
<box personID="[personID]" actionType="[actionType]" mode="[annotationMode]" pointNumber:0="[X_0,Y_0]" pointNumber:1="[X_1,Y_1]" pointNumber:2="[X_2,Y_2]" pointNumber:3="[X_3,Y_3]"/>
</frame>
</video>where [frameNumber] is the frame number starting from 0,[actionType] is the action of this bounding box, [X_i,Y_i] are the coordinates of corner i of the corresponding bouding box in frame [frameNumber].
Here is one example:
<?xml version="1.0" encoding="utf-8"?>
<video totalPeopleAmount="2">
<frame frameNumber="0">
<box personID="0" actionType="null" mode="0" pointNumber0="109.000000,82.000000" pointNumber1="271.000000,82.000000" pointNumber2="271.000000,296.000000" pointNumber3="109.000000,296.000000"/>
<box personID="1" actionType="null" mode="0" pointNumber0="317.000000,70.000000" pointNumber1="413.000000,70.000000" pointNumber2="413.000000,231.000000" pointNumber3="317.000000,231.000000"/>
</frame>
</video>