Documentation of WormPose.ΒΆ
Calculates the image similarity on a random selection of labeled frames from a dataset. |
|
Evaluates a trained model by predicting new synthetic images and calculating the image similarity and the angle error |
|
Exporting WormPose results to another format, for example the WCON format for a Tierpsy dataset |
|
Generates the training and evaluation data from a dataset. |
|
Post-processes WormPose results by interpolating over missing frames and smoothing |
|
Predicts videos using a trained model |
|
Trains the neural network on the training data, supports resuming training |
|
Save results to a H5 file |
|
Visualize the WormPose results as images showing the centerline on top of the original image |
|
Contains constant values for default paths and folder names |
|
This module contains the WormPose API: abstract classes to subclass in order to add a custom dataset |
|
This module deals with loading features from a dataset. |
|
Applies safely the frame preprocessing function to a frame, set the background pixels to a uniform value, deduces the region of interest |
|
Image processing example implementation for segmenting the worm in an image |
|
|
Simple BaseFramePreprocesing implementation |
The Dataset loader: instantiates the FramesDataset, FeaturesDataset, FramePreprocessing, ResultsExporter (optional). |
|
Simple FeaturesDataset implementation that reads features from a HDF5 file |
|
Simple FramesDataset implementation reading image files from a folder |
|
Handles all about the optional resizing of the images of a Dataset |
|
Dataset loader for the tutorial sample data |
|
Implementation of BaseFeaturesDataset to load Tierpsy tracker features |
|
Implementation of BaseFramesDataset to load Tierpsy tracker frames |
|
Exports WormPose results (skeleton only) in WCON format |
|
Visualizer for the real processed images |
|
Visualizer for the synthetic images |
|
Builds the real dataset, where images from a dataset are preprocessed and then cropped to be the same size |
|
Assesses the accuracy of a centerline theta compared to a real image, by calculating the image similarity metric |
|
Functions that deal with the image similarity |
|
This module performs image scoring on the results (shuffled: two scores per frame or not) It distributes the work to several processes |
|
Module responsible for drawing the synthetic worm image |
|
Contains the functions that deal with drawing the worm or some overlays |
|
Implements a Keras callback to save the top N best models on evaluation data, |
|
Generates evaluation data: random real processed images with labels and save them to a Tfrecord file |
|
Wrapper to save the training data to different file formats |
|
Definition of the loss function for the network |
|
Definition of the network model, a ResNet with three blocks |
|
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. |
|
Generates synthetic data using multiprocessing |
|
Functions to read and write TFrecord files containing wormpose labeled data: |
|
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 |
|
Contains function to calculate distances between worm poses, either represented as angles or as skeletons |
|
Utility functions to deal with eigenworms |
|
This module contains the logic to resolve the head-tail orientation of a predicted video time series. |
|
This module exposes the gaussian mixture model of worm postures from the resource file "postures_model.json.gz" |
|
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 |
|