datadings.sets.Coutrot1_write module

usage: Coutrot1_write.py [-h] [-o PATH] [-y] [-s] INDIR

Create Coutrot 1 data set files.

This tool will look for the following files in the input directory and download them if necessary:

  • coutrot_database1.mat

  • ERB3_Stimuli.zip

Note

ERB3_Stimuli.zip must be downloaded manually as it is hosted on mega.nz.

Warning

OpenCV 2.4+ is required to create this dataset. If you are unsure how to install OpenCV you can use pip:

pip install opencv-python

Important

Samples are extracted from video frames and thus NOT SHUFFLED! If this is not desirable the datadings-shuffle command can be used to create a shuffled copy.

Important

Samples have the following keys:

  • "key"

  • "image"

  • "experiments"

Each experiment has the following keys:

  • "locations"

  • "map"

Positional arguments

INDIR Directory that contains dataset source files.

options:
-h, --help

show this help message and exit

-o PATH, --outdir PATH

Output directory. Defaults to indir.

-y, --no-confirm

Don’t require user interaction.

-s, --skip-verification

Skip verification of source files.

class datadings.sets.Coutrot1_write.LucasKanade[source]

Bases: object

track(xy, pointid)[source]
update(frame)[source]

Update the tracking result for a new frame.

Parameters:

frame – Next frame.

Returns:

Dict of (point, (x, y)) pairs.

datadings.sets.Coutrot1_write.iter_frames_with_fixpoints(frame_gen, experiments)[source]
datadings.sets.Coutrot1_write.iter_video_frames_opencv(path)[source]
datadings.sets.Coutrot1_write.main()[source]
datadings.sets.Coutrot1_write.write_sets(files, indir, outdir, args)[source]
datadings.sets.Coutrot1_write.write_video(name_prefix, frame_gen, experiments, writer, min_fixpoints=30, write_delta=10, max_fixpoint_age=60)[source]