Skip to content

Output File Format

Andrés Solís Montero edited this page Jul 4, 2016 · 9 revisions

XML Format


<?xml version="1.0" encoding="UTF-8"?>
<!--Root Element -->
<annotate>

    <!-- Set of Actions -->
    <actions>
        <action>A1</action>
         ...
    </actions>
    
    <!-- Video sequence -->
    <sequence frameCount="Fc" id="Cam" width="W" height="H" type="T">
        <!-- Frame -->
        <frame id="Fid" targetCount="N" filename="Fname">
            <target id="Tid" action="S">
                <location>x1,y1,x2,y2,...,xM,yM</location>
            </target>
			...
        </frame>
		...
    </sequence>
	...
				
    <!-- Matching of target in the video sequence -->
    <matching>
        <match fromSeq="mFS" fromID="mFID" toSeq="mTS" toID="mTOID">
				...
    </matching>
</annotate>

Definitions

Variable Type Definition
A1 string Name of an action to be used in sequences
W integer Width of the frames in the sequence
H integer Height of the frames in the sequence
T string Type of sequence, e.g., "folder"
N integer Number of people detected in a particular frame
Fc integer Number of frames
targetCount integer Number of targets detected in the frame
Cam integer Camera index identifier, zero-based index
Fid integer Frame index identifier, zero-based index
S string Target state identifier from the action section
Fname string Filename of the frame, T must be "folder"
Tid string Target identifier
mFS integer Sequence identified number Cam value (from)
mTS integer Sequence identified number Cam value (to)
mFID integer Target id number (from)
mTID integer Target id number (to)
xi,yi float Coordinates (x,y) of the of the polygonal vertex number i
  1. The list of actions describe the possible values of target's action. S = {A1, A2, A3, ... , AN}
  2. State values are in camelBack format.
  3. Target identifier is unique in all the sequence.
  4. A match record can link two unique target's id from the same or different sequences.

Note about the states to be annotated (Example of Action states)

The states symbolized by variable S represents the following actions to be annotated by the user:

  1. Line Up: A client (target) enters into this state the first time appears in the cashier's camera; it leaves this state when the same target moves to the cashier's area to place an order.
  2. Order: A target enters into this state when it moves into the cashier's area to place an order; it leaves this state once it starts to pay.
  3. Pay: A target changes enters this state when start paying for its order; it leaves this state when its starts moving away from the cashier's area.
  4. Waiting: A target that moves away from the cashier area after paying enters into this state; it remains in this state despite in which camera appears until it starts picking up its order.
  5. Pick Up: This state marks when the target picks it order from the picking area; it ends when the target moves away from the picking area with its order.
  6. Leaving: This state marks the instant when the target moves away from the picking area with its order; it will remain in this state until it disappear from the view in all the cameras.

Status encoding

Status Code
Line Up lineUp
Order order
Pay pay
Waiting wait
Pick Up pickUp
Leave leave

Annotation states

Example:

<annotate>
    <actions>
        <action>lineUp</action>
        <action>order</action>
        <action>pay</action>
        <action>pickUp</action>
        <action>leave</action>
    </actions>
    <sequence frameCount="3" id="0" width="640" height="360" type="folder">
        <frame id="0" targetCount="1" filename="00000001.jpg">
            <target id="0" action="null">
                <location>336,156,365,156,365,218,336,218</location>
            </target>
        </frame>
        <frame id="1" targetCount="1" filename="00000002.jpg">
            <target id="0" action="null">
                <location>336,156,365,156,365,218,336,218</location>
            </target>
        </frame>
        <frame id="2" targetCount="1" filename="00000003.jpg">
            <target id="0" action="null">
                <location>336,156,365,156,365,218,336,218</location>
            </target>
        </frame>
    </sequence>
    <sequence frameCount="3" id="1" width="1080" height="720" type="folder">
        <frame id="0" targetCount="1" filename="00000001.jpg">
            <target id="0" action="null">
                <location>336,156,365,156,365,218,336,218</location>
            </target>
        </frame>
        <frame id="1" targetCount="1" filename="00000002.jpg">
            <target id="0" action="null">
                <location>336,156,365,156,365,218,336,218</location>
            </target>
        </frame>
        <frame id="2" targetCount="1" filename="00000003.jpg">
            <target id="0" action="null">
                <location>336,156,365,156,365,218,336,218</location>
            </target>
        </frame>
    </sequence>
    <matching>
        <match fromSeq="0" fromID="0" toSeq="0" toID="2"/>
        <match fromSeq="1" fromID="3" toSeq="1" toID="1"/>
    </matching>
    <annotate>

Clone this wiki locally