MPS

๐Ÿ“š Miniscope Processing Pipeline Guide

Overview

This guide walks through the complete miniscope calcium imaging processing pipeline โ€” from raw video to clean, separated neural signals ready for downstream analysis.

Quick Start

  1. Initial Setup โ€” Launch MPS from the installer-created shortcut (Windows) or app bundle (macOS).
  2. New Analysis โ€” Start at Step 1: Project Configuration.
  3. Existing Analysis โ€” File โ†’ Load parameters file, then Data โ†’ Load previous data, choose the step to resume, and use Automation โ†’ Run All Steps or Run From Current Step.

Walkthrough + sample code: MPS_Sample_Code (README + files)

License: Licensed under the Apache License, Version 2.0. You may obtain a copy at http://www.apache.org/licenses/LICENSE-2.0

Pipeline Steps

Step 1 Project Configuration

Required inputs:

  • Animal ID โ€” numeric identifier for the animal
  • Session ID
  • Input directory โ€” folder containing your video files
  • Output directory โ€” where results will be saved

Advanced (Dask) Settings: 8 workers, 200 GB memory limit, 100% video percentage by default. Reduce video percentage for testing.

Note: Animal ID currently only accepts numeric values due to how naming conventions propagate through the pipeline. This is a known limitation and may be addressed in a future update.

Step 2 Data Preprocessing

2a ยท File Pattern Recognition
  • Use regex to match your video files โ€” the .avi pattern is pre-set.
  • Tip: paste an example file path into an LLM and it will generate the correct regex.
  • Downsampling is optional if your machine has sufficient resources.
  • Line splitting detection is optional โ€” see Advanced Features.
2b ยท Background Removal & Denoising

Denoising methods:

  • Median โ€” best for salt-and-pepper noise, preserves edges well. General-purpose default.
  • Gaussian โ€” smooth uniform blur; good when you need everything smooth but can lose sharp detail.
  • Bilateral โ€” edge-preserving blur; slower but keeps neuron boundaries sharp.
  • Anisotropic โ€” directional smoothing that follows structure shape; great for elongated neurons but slowest.

Background removal methods:

  • Tophat โ€” subtracts a morphologically opened version of the image. Robust and works well for most data.
  • Uniform โ€” rolling average subtraction; faster, best when background changes are smooth and gradual.
2c ยท Motion Correction
  • Keep motion estimation on "frame" (default).
  • This is one of the longer steps โ€” expect ~3ร— your video size in RAM. For very large datasets, Step 7e may take comparable or longer time.
  • Algorithm uses recursive estimation with phase correlation.
2d ยท Quality Control
  • Threshold factor: how many standard deviations above the mean motion must be before a frame is dropped.
2e ยท Data Validation
  • Keep fill value as zero (for NaNs). Keep all other options checked. Validates transformed data integrity.
2f ยท Preview Results
  • Processes a subset of data โ€” saves only statistics, not full output. Use as a gut-check before committing to the full run.

Step 3 Spatial Cropping & Initialization

3a ยท Define ROI
  • Keep the crop as tight as possible โ€” this directly impacts processing speed throughout the pipeline.
  • Test on 10% of the video first, then return with the full video.
  • Use a circular crop centered on your imaging field. Adjust offset if the field is not centered.

Tip: After cropping, MPS saves data as a Zarr file. The image shown during cropping is roughly the mean pixel brightness across frames. If you need a static 2D image of the cropped field for presentations, you can export one from the Zarr output with a short Python snippet (load the array, save the mean frame as a JPEG).

3b ยท NNDSVD Initialization

Think of NNDSVD like a conductor listening to an orchestra warm up โ€” instead of isolating each instrument one by one, it instantly identifies the major sections from the combined sound. NNDSVD does the same: it decomposes the full video into a compact set of spatial components rapidly, giving the CNMF a strong starting point.

What it's actually doing: Non-Negative Double Singular Value Decomposition โ€” a fast matrix factorization that expresses your video as a product of three simpler matrices. Unlike PCA, SVD reaches a near-equivalent answer much faster on large datasets. The NN ("non-negative") constraint adds the biological prior that fluorescence can't be negative, encouraging spatially compact, blob-like components.

Parameters:

  • Number of components โ€” Component zero typically captures background variation (the first singular vector reflects the dominant variance, which in miniscope recordings is usually neuropil/background fluorescence). Components 1+ are candidate neural signals, ordered roughly by variance explained. Even 20โ€“50 components typically capture 99%+ of variance in a sparse brain region.
  • Power iterations โ€” refines the SVD (5 is usually sufficient).
  • Sparsity threshold โ€” (0.05 = keep signals 5% above noise floor). In regions with fewer neurons and lower overall activity, a lower threshold helps avoid discarding dim but genuine signals. In denser regions, a higher threshold excludes noise.
  • Spatial regularization โ€” encourages blob-like components. Increase for larger, spread-out neurons; decrease for very small, compact ones.
  • Chunk size โ€” decrease for less memory use at the cost of slower processing.

Important: The goal here is not perfection โ€” it is a fast, good-enough initialization for CNMF. NNDSVD is seeding the solution space so CNMF doesn't have to search from scratch. Spending significant time tuning these parameters provides diminishing returns. If your final CNMF results look reasonable, your initialization was good enough.

3c ยท Early Analysis Option

Some workflows stop here for preliminary results. The variance-explained plot shows cumulative % of data variance captured as components are added. For most miniscope datasets, 99%+ is typically accounted for within the first few components. You don't need 100% โ€” the final fraction of a percent usually contains noise. If you're at 95โ€“99%, your initialization is in good shape.

Step 4 Component Detection

4a ยท Watershed Parameter Search

Watershed segmentation identifies candidate neurons. Since it's better to overestimate at this stage, this step quickly finds optimal parameters.

  • Min distances โ€” minimum pixel distance between neuron centers (e.g., 10, 20, 30 tests different spacings).
  • Threshold relativity โ€” how much brighter than surroundings a peak needs to be (0.1 = 10% brighter). Think of this as the elevation cutoff on a topographic map โ€” lowering it detects more candidates, including noise. The CNMF downstream will prune false positives, so over-seeding here is not catastrophic, just slower. If you get consistently fewer components than expected, try lowering this. If you then see overlapping or unclear components in the final output, you over-seeded.
  • Sigma values โ€” smoothing before peak-finding (1.0 = sharp, 2.0 = slightly blurry).
  • Sample size โ€” components to test (20 is usually enough).
4b ยท Apply Best Parameters

Known bug: After Step 4a suggests parameters, you must deselect and then reselect the "Apply Filter / Apply Search" option before running Step 4b. Skipping this causes the step to default to cache from a previous run (typically min_distance=20) rather than the new suggestions. This issue does not apply when loading parameters from a JSON file.

  • Minimum region size โ€” smallest neuron size you'll accept. Better to be permissive here; small components can be filtered later.
4c ยท Merging Units

Collapses spatially overlapping components that were over-segmented in 4b.

  • Distance Threshold โ€” how close (px) two centers need to be to consider merging (25 px is a good start).
  • Size Ratio Threshold โ€” won't merge if one component is much larger (5.0 = up to 5ร— size difference).
  • Minimum Component Size โ€” removes anything smaller than this (9 px = 3ร—3 minimum).
4d ยท Temporal Signal Extraction

Extracts calcium traces from each spatial component โ€” going from "where are the neurons" to "what are they doing."

  • Batch Size โ€” components per batch (10 is safe).
  • Frame Chunk Size โ€” frames per load (10,000 works for most systems).
  • Component Limit โ€” for testing, process a subset first.
  • Memory Management โ€” keep on unless you have unlimited RAM.
4e ยท AC Initialization

Prepares the spatial (A) and temporal (C) matrices for CNMF. Skip component 0 (background).

  • max โ€” normalize to brightest pixel (default, works well).
  • l1 โ€” normalize by total brightness; use when component sizes vary a lot.
  • l2 โ€” normalize by energy; mathematical option.
  • none โ€” raw values; only if you know what you're doing.
4f ยท Final Component Preparation

Quality control before expensive processing. Remove NaN, empty, and flat components. These will break downstream steps if left in.

4g ยท Temporal Merging

Final cleanup โ€” merges components that are probably the same neuron split across detections.

  • Temporal Correlation Threshold โ€” how similar traces need to be (0.75 = 75% similar).
  • Spatial Overlap Threshold โ€” how much components must overlap spatially (0.3 = 30% minimum).

Step 5 CNMF Preparation

5a ยท Noise Estimation

Estimates per-pixel noise across the field of view. Critical for CNMF โ€” it tells the algorithm which parts of the signal to trust.

  • Noise Scaling Factor โ€” in active regions, noise is higher due to shot noise from calcium indicators. Default 1.5 scales up the estimate in bright areas.
  • Smoothing Sigma โ€” spatially smooths the noise map to avoid pixel-to-pixel variation (1.0 = gentle).
  • Background Threshold โ€” mean (good default), median (more robust to outliers), or custom.
5b ยท Validation & Setup

Quality control checkpoint before CNMF computation.

  • Check for NaN/Inf โ€” these will break CNMF. Always check (may be slow on huge datasets).
  • Compute Full Statistics โ€” detailed component stats for troubleshooting.
  • Size Filtering โ€” minimum 10 px, maximum 1,000 px. Components outside this range are likely artifacts or merged neurons.

Step 6 CNMF Processing

6a ยท YrA Computation

Computes YrA โ€” the raw projection of the video data onto each component's spatial footprint. This gives the corresponding fluorescence signal at each timepoint for each neuron, before any denoising or spike inference. This is one of the computational bottlenecks of CNMF.

  • Subtract Background โ€” recommended.
  • Use Float32 โ€” cuts memory in half with minimal precision loss. Always recommended.
  • Fix NaN Values โ€” replace with zeros before computation.
6b ยท YrA Validation

Sanity check on the YrA computation. What YrA actually means: it is the raw projection of video data onto each spatial footprint โ€” not a measure of variance explained. High YrA at a given time means strong fluorescence in that neuron's footprint at that moment. This projection feeds into the AR/sparsity optimization in Step 6d.

  • Units to Analyze โ€” 5 is usually enough to spot issues.
  • Frame Selection โ€” random, start/middle/end (highest_variance not yet implemented).
  • Number of Frames โ€” 1,000 is sufficient for validation.
6c ยท Parameter Suggestions for Temporal Update

Analyzes your data to suggest AR order, sparse penalty, max iterations, and zero threshold. It examines SNR distribution, temporal dynamics, AR coefficient strengths, and spike rates.

Note on variability: Running Step 6c multiple times may produce slightly different suggested values due to rounding differences between how suggestions are displayed vs. stored internally. This is expected โ€” it does not indicate a problem. Loading parameters from a JSON file bypasses this entirely.

6d ยท Update Temporal Components

The core CNMF temporal update. Outputs: C (denoised calcium traces), S (inferred spike trains), b0/c0 (background), g (AR coefficients).

  • AR Order (p)
    • AR=1 โ€” simple linear decay model. If two spikes fire before the signal returns to baseline, they are counted as one event. Produces cleaner, sparser traces.
    • AR=2 โ€” allows more nonlinear dynamics, can resolve closely spaced events, but produces noisier traces. AR order is conventionally an integer โ€” use 1 or 2.
  • Sparse Penalty โ€” L1 penalty (sum of absolute spike amplitudes). Higher = fewer but more confident spikes. Lower = more spikes but higher noise risk. If you lower the sparse penalty and are concerned about noise, raise the zero threshold to compensate.
  • Zero Threshold โ€” values below this are set to zero. Useful complement to a lower sparse penalty: detects more events while suppressing low-amplitude noise.
  • Max Iterations โ€” 500 is usually sufficient.
  • Chunk Size / Overlap โ€” 5,000 frames per chunk, 100-frame overlap to avoid edge artifacts.
  • Dask Settings โ€” 8 workers is good for most systems; match threads per worker to your CPU core count.
6e ยท Filter & Validate

Removes components that didn't optimize well. Min spike sum, min calcium variance, and min spatial sum thresholds (all default 1e-6) catch dead or artifact components.

Step 7 Spatial Refinement

What Steps 7aโ€“7d are doing: These steps prepare and organize the computation for the spatial update in Step 7e โ€” they are not themselves changing what neurons look like. Dilation (7a) gives the update enough context around each footprint. Clustering (7b) and bounding boxes (7c) divide the field of view into manageable local patches so the algorithm only processes the relevant pixels around each neuron cluster, dramatically improving efficiency.

7a ยท Spatial Component Dilation

Expands spatial footprints for better coverage. CNMF footprints are often conservatively tight.

  • Dilation Window Size โ€” radius of structuring element (3 px typical). Larger = more expansion, risk of merging neighbors.
  • Intensity Threshold โ€” only dilate pixels above this fraction of component max (0.1 = 10%). Higher = more conservative.
7b ยท Component Clustering

Groups nearby components into clusters for efficient local processing.

  • Max Cluster Size โ€” 10 components default.
  • Min Area / Min Intensity โ€” thresholds to exclude trivially small or dim components from clustering.
  • Overlap Threshold โ€” 0.2 (20%) default.
7c ยท Component Boundary Calculation

Creates bounding boxes around clusters โ€” rectangular regions used to limit the spatial update to relevant areas.

  • Dilation Radius (10 px) โ€” expands footprints before calculating bounds.
  • Padding (20 px) โ€” extra space around the dilated shapes; important near cluster edges.
  • Minimum Size (40 px) โ€” smallest allowed bounding box.
  • Intensity Threshold (0.05) โ€” what fraction of a component's max is considered "part of the neuron."
7d ยท Parameter Suggestions for Spatial Update

Analyzes temporal variability, spatial coherence, signal strength, and component shape to suggest minimum STD threshold, penalty scale, and maximum penalty for Step 7e. Treat these as an informed starting hypothesis.

Common scenarios:

  • Neurons look fragmented โ†’ lower penalty values
  • Neurons are merging โ†’ higher penalty values
  • Missing dim neurons โ†’ use aggressive (lower) STD threshold
  • Too much noise โ†’ use conservative (higher) STD threshold
7e ยท Spatial Update

Multi-penalty LASSO regression on local video regions. This is the longest step in the pipeline for large datasets.

  • Min / Max Penalty โ€” LASSO penalty range. Higher values โ†’ more compact, tightly defined footprints. Lower values โ†’ more expansive.
  • Min STD โ€” pixels below this variability are excluded from the update.

On spatial maps: The footprint shows which pixels the signal is coming from โ€” not necessarily the full anatomical extent of the neuron. Neurons may be larger than their detected footprint depending on lens configuration, GCaMP expression level, and camera angle. As long as you are not making morphological claims, either a compact or expansive footprint is defensible. The temporal signals carry the scientific information.

7f ยท Merging & Validation

Merges updated spatial components, handles cluster-boundary overlaps, and validates the final spatial result.

  • Apply smoothing / Smoothing Sigma โ€” optional Gaussian smoothing. Be cautious: too high a sigma causes footprints to bleed into large, diffuse blobs that may overlap neighboring neurons. Blocky or rectangular-looking components are more likely caused by bounding box geometry from the clustering step โ€” reducing sigma will not fix that artifact. If components look unnaturally spread or merged, reduce sigma or turn off smoothing.
  • Handle overlaps โ€” keep on in almost all cases. Turning it off can produce inconsistent boundaries where cluster windows overlap.
  • Save both versions โ€” saves raw and smoothed versions for comparison.

Step 7f is quick to re-run relative to 7e โ€” experiment with smoothing settings here without redoing the full spatial update.

Step 8 Final Processing & Export

8a ยท YrA Computation

Recomputes YrA using the refined spatial components from Step 7. This gives each neuron's temporal trace computed against better footprints than Step 6 had access to. Use step7f_A_merged as the spatial component source.

8b ยท Final Temporal Update

Re-runs the CNMF temporal update (CVXPY with AR modeling and sparsity constraints) on the improved YrA from Step 8a. See Step 6d for a full explanation of AR order and sparse penalty tradeoffs โ€” the same logic applies here.

  • Include background โ€” incorporates background components (b, f).
  • Chunk Size / Overlap โ€” temporal chunking for memory efficiency; chunks are processed independently then merged.

Why Step 8 matters: Step 6 produces the first full CNMF solution. Step 8 re-runs the temporal update using the improved spatial footprints from Step 7 โ€” that is the key reason it matters. Because the spatial components are more accurate after Step 7's refinement, the temporal traces from Step 8 are cleaner. Note that because the solution is already near convergence, parameter choices here tend to have subtler effects than the same changes in Step 6. Both steps deserve careful attention; Step 8 is the last opportunity to refine your final traces before export.

Cross-session comparisons: Using identical Step 8 parameters across all animals and sessions means resulting traces are mathematically comparable on an absolute scale โ€” no Z-scoring required before comparing recordings. This holds assuming stable GCaMP expression and consistent optical conditions across sessions. If conditions varied substantially, Z-score before comparing regardless. Either approach is valid; consistency is the key.

8c ยท Final Filtering & Export

Final quality filtering (min component size, min SNR, min correlation), then export in multiple formats.

ZarrChunked storage โ€” ideal for large-scale, out-of-memory analysis
NumPyCompatible with most Python analysis pipelines
JSONHuman-readable metadata and component IDs; easy to share
PickleComplete Python objects with all metadata for quick Python-to-Python transfer

The export includes a timestamp and all processing parameters for full reproducibility.

Parameter Tuning Philosophy

One of the most common questions when using MPS is: which parameters matter, and when? Understanding the pipeline's architecture helps.

Steps 1โ€“5: Initialization

Their job is to give CNMF a well-structured starting point. A CNMF run from random initialization would take far longer to converge and might settle into a suboptimal local minimum โ€” analogous to searching for a mountain peak when you've only been shown a narrow window of the landscape. Preprocessing, denoising, motion correction, NNDSVD, and watershed all serve to place the algorithm close to the right answer before the expensive optimization begins. Over-tuning parameters here provides diminishing returns. Focus your energy on Steps 6, 7, and 8.

Steps 6 & 8: Most Scientifically Important

These are where the actual temporal signals are estimated. Step 6 produces the first full CNMF solution; Step 8 refines it using the improved spatial footprints from Step 7. Step 6 parameters have more leverage โ€” changes there can produce substantially different results because the algorithm has more room to move. Step 8 is where you get the final, cleanest traces, but parameter sensitivity is subtler since the solution is already near convergence.

Step 7: Spatial Appearance

If you care about how footprints look โ€” for figures, presentations, or ROI definition โ€” tune Step 7. But recognize that for most scientific conclusions, the spatial map is a reference, not the result. Neurons may not fully illuminate even with GCaMP expression depending on lens position, focal plane, expression level, and vasculature. The shape you see is where reliable signal is coming from, not necessarily the full anatomical extent of the cell.

On Neuron Counts in Sparse Brain Regions

If you are recording from a region with few neurons (e.g., 20โ€“30 per session), this likely reflects your data rather than a pipeline failure. Every additional component you force in must be "paid for" by subtracting from noise and background estimates in the CNMF model. In a recording with 20 bright neurons, adding 2โ€“3 dim candidates risks introducing noise into the traces of all 20. High-quality signals from 20 neurons are more valuable than noisy signals from 25.

On Parameter Generalizability

Default and suggested parameters are good starting points developed with specific data in mind. Your optimal parameters depend on brain region, calcium indicator kinetics (GCaMP6f vs. GCaMP8f differ meaningfully), lens numerical aperture, recording duration, and expected neuronal density. Treat parameter suggestions as informed hypotheses, and interpret the diagnostic plots at each stage as your evidence for whether to adjust.

Tips & Best Practices

  1. Start small โ€” test parameters on 10% of your data before running the full pipeline.
  2. Monitor memory โ€” the pipeline is memory-intensive; Step 2c and Step 7e are the main bottlenecks.
  3. Save frequently โ€” enable autosave in the automation menu.
  4. Check intermediate results โ€” use visualization steps 2f and 6b to verify processing quality before continuing.
  5. Adjust for your data โ€” defaults work for most data, but your recording may need tweaks based on brain region and indicator.
  6. When in doubt, oversegment โ€” it's easier to merge components later than to split them.
  7. Use parameter suggestions as a starting point โ€” Steps 4a and 7d analyze your specific data to recommend settings. Treat these as an informed hypothesis, not a prescription. Validate by inspecting the diagnostic plots at each stage.
  8. Use temporal chunking in Step 8 โ€” dramatically reduces memory usage for long recordings.
  9. Export multiple formats โ€” different downstream analyses prefer different formats.
  10. Document your parameters โ€” the pipeline saves all parameters automatically for reproducibility.
  11. Inspect temporal signals, not just spatial maps โ€” the calcium traces are the primary scientific output. Spatial footprints are reference maps; don't over-interpret their exact shape.
  12. Use consistent parameters across sessions โ€” identical Step 8 parameters across recordings enable direct trace comparison without Z-scoring (assuming stable imaging conditions).

Common Issues & Solutions

Memory errors during YrA computation
  • Reduce components processed at once
  • Use float32 precision
  • Increase Dask memory limits
Components look fragmented after spatial update
  • Decrease penalty values in Step 7e
  • Check if minimum STD threshold is too high
Too many spurious components detected
  • Increase minimum component size thresholds
  • Use conservative parameter suggestions
  • Increase distance threshold in watershed segmentation
Temporal traces look noisy
  • Try AR p=2 instead of p=1
  • Adjust sparse penalty (try higher values)
  • Check if noise estimation in Step 5a is accurate
Background components missing
  • Ensure Step 3b includes component 0
  • Check that background removal in 2b isn't too aggressive
Step 8a YrA computation fails
  • Check that spatial and temporal components have matching unit IDs
  • Ensure all required data from previous steps is available
  • Try reducing to a component subset for testing
CVXPY solver failures in Step 8b
  • Reduce max iterations if taking too long
  • Code tries ECOS first, then SCS โ€” check solver tolerances
  • Check for all-zero trace components
Memory errors during Step 8
  • Use temporal chunking with smaller chunk sizes
  • Process components in batches
  • Close other applications to free RAM
Step 4b not applying suggested parameters
  • Deselect then reselect "Apply Filter / Apply Search" before running
  • Or load parameters from a JSON file to bypass this entirely
Spatial components look diffuse or merged after Step 7f
  • Reduce smoothing sigma or disable smoothing
  • Note: blocky/rectangular components come from bounding box geometry, not over-smoothing โ€” reducing sigma won't fix that
  • Step 7f can be re-run quickly without redoing Step 7e

Interpreting Your Results

Spatial Components (A)

  • What they show โ€” the spatial footprint of each neuron.
  • What to look for โ€” clear, contiguous regions roughly matching expected neuron size.
  • Red flags โ€” highly fragmented components; components much larger than expected neurons.
  • Important caveat โ€” the footprint shows where reliable fluorescence was detected, not the full anatomical extent of the neuron. Shape and size are influenced by lens focal plane, expression heterogeneity, and local vasculature. Do not make morphological conclusions from these footprints.

Temporal Components (C)

  • What they show โ€” denoised calcium traces for each neuron.
  • What to look for โ€” clear calcium transients with good SNR.
  • Red flags โ€” flat traces, excessive noise, unrealistic dynamics.
  • This is the primary scientific output. Spend more time evaluating trace quality than spatial map appearance.

Spike Estimates (S)

  • What they show โ€” inferred spike times and amplitudes.
  • What to look for โ€” sparse events corresponding to calcium transients.
  • Red flags โ€” continuous spiking; no detected events at all.

Quality Metrics

  • Component size distribution โ€” should match expected neuron sizes for your preparation.
  • Signal amplitude distribution โ€” should show clear separation from noise.
  • Temporal correlation โ€” neurons shouldn't be perfectly correlated unless truly synchronized.

Downstream Applications

  • Population analysis โ€” study ensemble activity patterns.
  • Single-cell analysis โ€” track individual neuron responses.
  • Behavioral correlation โ€” link neural activity to behavior.
  • Network analysis โ€” study functional connectivity.
  • Longitudinal studies โ€” track the same neurons across sessions.

Remember: the pipeline provides cleaned signals, but biological interpretation requires domain knowledge. When in doubt, consult the original videos to verify detected components correspond to real neurons.

Advanced Features

Line Splitting Detection

Some miniscope systems produce line-splitting artifacts โ€” signal appearing in the leftmost pixels of frames. The pipeline can automatically detect and remove these frames.

import numpy as np def detect_line_splitting_frames(xarray_data): """ Detect line splitting frames by looking for signal in the leftmost 20 pixels. Args: xarray_data: xarray DataArray with dimensions ['frame', 'height', 'width'] Returns: list: Frame indices to drop, e.g. [45, 123, 456] """ left_edge = xarray_data.isel(width=slice(0, 20)) left_edge_means = left_edge.mean(dim=['height', 'width']).compute() overall_mean = left_edge_means.mean().item() overall_std = left_edge_means.std().item() threshold = overall_mean + 2 * overall_std problematic_frames = np.where(left_edge_means > threshold)[0] return problematic_frames.tolist()

Enable in Step 2a if you notice vertical lines or artifacts on the left edge of your videos.

Note: If no erroneous frames are detected, the all_removed_frames.txt log file will not be created. This is expected โ€” the absence of the file means no frames were removed, not that something went wrong.

Batch Processing with Parameters

  • Save parameters โ€” after a successful run, File โ†’ Save parameters.
  • Load parameters โ€” for a new dataset, File โ†’ Load parameters. Values are applied directly, bypassing any cache issues.
  • Automation โ€” enable automation to run multiple steps unattended.

Custom Preprocessing Functions

Add custom preprocessing in Step 2a by modifying the post_process parameter in the video loading function.

Non-rigid Motion Correction

For datasets with significant non-rigid motion, enable mesh-based correction in Step 2c by specifying a mesh size (e.g., (5,5) for a 5ร—5 control point grid).

Automation Features

  • Automation โ†’ Toggle Autorun
  • Automation โ†’ Configure Autorun (set delays)
  • Automation โ†’ Run All Steps
  • Automation โ†’ Run From Current Step

Parameter files are automatically applied to each step during autorun. Auto-save preserves parameters after each step.

System Requirements

RAM (minimum)32 GB (64 GB+ recommended)
RAM (recommended)128 GB+ for large datasets
CPU (minimum)8+ cores
CPU (recommended)16+ cores for parallel processing
Storage (minimum)SSD with 2ร— video size free space
Storage (recommended)NVMe SSD for fastest I/O
GPUNot required; can accelerate some operations
NetworkFast connection if using network storage