Documentation of WormPose.ΒΆ

wormpose.commands.calibrate_dataset

Calculates the image similarity on a random selection of labeled frames from a dataset.

wormpose.commands.evaluate_model

Evaluates a trained model by predicting new synthetic images and calculating the image similarity and the angle error

wormpose.commands.export_results

Exporting WormPose results to another format, for example the WCON format for a Tierpsy dataset

wormpose.commands.generate_training_data

Generates the training and evaluation data from a dataset.

wormpose.commands.postprocess_results

Post-processes WormPose results by interpolating over missing frames and smoothing

wormpose.commands.predict_dataset

Predicts videos using a trained model

wormpose.commands.train_model

Trains the neural network on the training data, supports resuming training

wormpose.commands.utils.results_saver

Save results to a H5 file

wormpose.commands.utils.time_sampling

wormpose.commands.visualize_results

Visualize the WormPose results as images showing the centerline on top of the original image

wormpose.config.default_paths

Contains constant values for default paths and folder names

wormpose.config.experiment_config

wormpose.dataset.base_dataset

This module contains the WormPose API: abstract classes to subclass in order to add a custom dataset

wormpose.dataset.features

This module deals with loading features from a dataset.

wormpose.dataset.image_processing.frame_preprocessor

Applies safely the frame preprocessing function to a frame, set the background pixels to a uniform value, deduces the region of interest

wormpose.dataset.image_processing.image_utils

Image processing example implementation for segmenting the worm in an image

wormpose.dataset.image_processing.options

wormpose.dataset.image_processing.simple_frame_preprocessing

Simple BaseFramePreprocesing implementation

wormpose.dataset.loader

The Dataset loader: instantiates the FramesDataset, FeaturesDataset, FramePreprocessing, ResultsExporter (optional).

wormpose.dataset.loaders.hdf5features

Simple FeaturesDataset implementation that reads features from a HDF5 file

wormpose.dataset.loaders.images_folder

Simple FramesDataset implementation reading image files from a folder

wormpose.dataset.loaders.resizer

Handles all about the optional resizing of the images of a Dataset

wormpose.dataset.loaders.sample_data

Dataset loader for the tutorial sample data

wormpose.dataset.loaders.tierpsy.features_dataset

Implementation of BaseFeaturesDataset to load Tierpsy tracker features

wormpose.dataset.loaders.tierpsy.frames_dataset

Implementation of BaseFramesDataset to load Tierpsy tracker frames

wormpose.dataset.loaders.tierpsy.results_exporter

Exports WormPose results (skeleton only) in WCON format

wormpose.demo.real_simple_visualizer

Visualizer for the real processed images

wormpose.demo.synthetic_simple_visualizer

Visualizer for the synthetic images

wormpose.images.real_dataset

Builds the real dataset, where images from a dataset are preprocessed and then cropped to be the same size

wormpose.images.scoring.centerline_accuracy_check

Assesses the accuracy of a centerline theta compared to a real image, by calculating the image similarity metric

wormpose.images.scoring.image_scoring

Functions that deal with the image similarity

wormpose.images.scoring.results_scoring

This module performs image scoring on the results (shuffled: two scores per frame or not) It distributes the work to several processes

wormpose.images.scoring.scoring_data_manager

wormpose.images.synthetic.synthetic_dataset

Module responsible for drawing the synthetic worm image

wormpose.images.worm_drawing

Contains the functions that deal with drawing the worm or some overlays

wormpose.machine_learning.best_models_saver

Implements a Keras callback to save the top N best models on evaluation data,

wormpose.machine_learning.eval_data_generator

Generates evaluation data: random real processed images with labels and save them to a Tfrecord file

wormpose.machine_learning.generic_file_writer

Wrapper to save the training data to different file formats

wormpose.machine_learning.loss

Definition of the loss function for the network

wormpose.machine_learning.model

Definition of the network model, a ResNet with three blocks

wormpose.machine_learning.predict_data_generator

This module assembles image data batches by preprocessing each image with a BaseFramePreprocessing object It distributes the work to several processes and provides each batch as they are ready.

wormpose.machine_learning.synthetic_data_generator

Generates synthetic data using multiprocessing

wormpose.machine_learning.tfrecord_file

Functions to read and write TFrecord files containing wormpose labeled data:

wormpose.pose.centerline

This module contains function related to the worm centerline, for example to convert skeleton (x, y) coordinates to angles, flip the head-tail orientation etc

wormpose.pose.distance_metrics

Contains function to calculate distances between worm poses, either represented as angles or as skeletons

wormpose.pose.eigenworms

Utility functions to deal with eigenworms

wormpose.pose.headtail_resolution

This module contains the logic to resolve the head-tail orientation of a predicted video time series.

wormpose.pose.postures_model

This module exposes the gaussian mixture model of worm postures from the resource file "postures_model.json.gz"

wormpose.pose.results_datatypes

This module contains data structures representing tracking results They all contain theta, scores and skeletons but we use several subclasses to specify the current step of the tracking pipeline

wormpose.version