Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Data generation

Marek Pokropiński edited this page Jan 27, 2021 · 6 revisions

Generate training data

$ cd model/detection_model
$ python generate_frames.py
$ python generate_records.py

Generate tracking evaluation data

$ cd data
$ python generate_tracking.py

This is going to create two files for each video from ./PigTrackingDataset2020, frames_tracking.json and pigs_tracking.json.

frames_tracking.json

Contains tracking data per frame, structure:

{
    "frame_id": List<x:float,y:float,id:int>
}

@x and @y are floats describing the proportional position of the center point of the animal (ranges from 0 to 1).
@id is an integer identifier for an animal

pigs_tracking.json

Contains tracking data per animal, structure:

{
    "animal_id": List<x:float, y:float, frame_id:int>
}

@x and @y are floats describing the proportional position of the center point of the animal (ranges from 0 to 1).
@frame_id is a frame id (incremental)