CaImAn: Technical Review of Architecture, Evidence, and Current Software State

Review basis:CaImAn v1.13.2, released July 28, 2026, together with the current documentation, tagged source code, and the primary CaImAn, NoRMCorre, OASIS, and CNMF-E papers.

Executive assessment

CaImAn is best understood as a computational imaging platform rather than one fixed calcium-imaging pipeline. It brings together motion correction, offline and online source extraction, background modeling, temporal inference, automated component screening, file handling, parallel processing, and cross-session registration. The same repository also contains VolPy for voltage imaging, although VolPy is a separate analysis system rather than another CNMF mode.

This breadth is CaImAn's main strength. A laboratory can move from a raw movie to motion-corrected data, source estimates, deconvolved activity, quality scores, saved results, and longitudinal cell assignments without assembling an unrelated collection of packages. The tradeoff is that CaImAn exposes many scientifically consequential choices. Parameters such as expected source size, patch geometry, one-photon background settings, motion limits, temporal model order, merge thresholds, and component-quality criteria can change the final population of accepted components.

The most accurate summary is therefore not that CaImAn is fully automatic. It is that CaImAn automates a large amount of work inside an explicit but demanding model. The software can be highly effective when its assumptions match the experiment, but a successful run is not evidence that the biological interpretation is correct.

1. CaImAn is a family of related workflows

Current CaImAn organizes its main calcium-imaging functionality around several shared objects:

-MotionCorrectfor rigid and piecewise-rigid NoRMCorre processing;

-CNMFParamsfor grouped configuration;

-CNMFfor offline source extraction;

-OnACIDand one-photon online variants for streaming analysis;

-Estimatesfor fitted spatial, temporal, background, residual, quality, and registration results.

Those common objects make the package feel coherent, but the underlying scientific models are not identical across all use cases. Standard two-photon CNMF, one-photon CNMF-E, online OnACID, online one-photon processing, seeded analysis, volumetric analysis, dendritic workflows, and VolPy do not simply run the same algorithm with one switch changed.

A technical review should keep at least four boundaries visible:

1.Two-photon CNMF and one-photon CNMF-E use different background models.

2.Offline batch analysis and online analysis have different update schedules and failure modes.

3.Somatic component classifiers are not automatically appropriate for dendrites, axons, or unfamiliar preparations.

4.VolPy is a voltage-imaging pipeline, not a CNMF extension.

The official feature list is broad, but breadth should not be mistaken for uniform validation across every modality.CaImAn documentationandcurrent feature overviewprovide the appropriate starting point.

2. The current batch workflow is more iterative than a simple diagram suggests

A simplified description often presents CaImAn as:

motion correction -> CNMF -> deconvolution -> quality filtering

That is useful as orientation, but it is not a faithful description of the standard current batch demo. A more representative workflow is:

1.inspect and load the recording;

2.run rigid or piecewise-rigid NoRMCorre;

3.save the corrected movie in CaImAn's memory-mapped working format;

4.run an initial, usually patch-based CNMF pass;

5.merge components and refit them against the complete field of view;

6.update spatial and temporal parameters, including deconvolution when enabled;

7.evaluate components using temporal, spatial, and optional CNN criteria;

8.optionally retain or discard components;

9.calculate a normalized fluorescence representation when appropriate;

10.save the analysis object to HDF5.

In the current official demo, deconvolution may be disabled during the initial patch stage for speed and then performed during the full-data refit. OASIS is therefore integrated into temporal estimation; it is not necessarily a separate universal stage appended after an otherwise complete CNMF result. The exact sequence also changes for seeded, one-photon, online, and volumetric workflows.

This distinction matters for methods reporting. Saying only that a study "ran CaImAn" does not identify which pass generated the reported traces, whether patch-stage activity was used, whether a refit occurred, or whether component selection happened before or after normalized fluorescence was calculated. The taggedv1.13.2 batch demois more informative than a generic block diagram.

3. Standard CNMF and CNMF-E should not be collapsed into one equation

For standard two-photon CNMF, the familiar conceptual model is:

Y approximately equals A C + b f + E

whereAcontains spatial source footprints,Ccontains their temporal traces,b fis a low-rank background term, andEis residual error. This model is appropriate when broad background activity can be represented with a relatively small number of spatial and temporal factors.

One-photon microendoscopic recordings often violate that assumption. Out-of-focus fluorescence creates a strong local background that varies spatially and can be correlated with neural activity. CNMF-E therefore uses a different background architecture. In current CaImAn results, one-photon ring-model quantities includeWandb0, rather than only the standard low-rankbandffactors.

This is more than an implementation detail. The background model controls what fluorescence is assigned to a neuronal component and what is removed as nuisance structure. A model that is too weak leaves contamination inC; a model that is too flexible can absorb genuine transient amplitude.

For one-photon analysis, parameters such ascenter_psf,ring_size_factor,gSig,gSiz,min_corr,min_pnr, patch size, and background rank or ring configuration are central scientific choices. Current guidance commonly usescorr_pnrinitialization,center_psf=True, and a ring model with no global low-rank background component, but these are starting points rather than universal constants. Full-rank alternatives can be faster in some cases while using substantially more memory.CaImAn one-photon guidancedocuments these tradeoffs.

The original review was therefore right to emphasize background modeling, but the genericBterm hid the most important modality-specific difference in the package.

4. NoRMCorre is rigid or piecewise-rigid, not arbitrary deformable registration

NoRMCorre is one of CaImAn's foundational contributions. It supports:

-one global translational shift per frame in rigid mode;

-locally estimated translational shifts on overlapping patches in piecewise-rigid mode.

The piecewise-rigid method allows different parts of a frame to move differently, but it should not be described as an unconstrained optical-flow or fully deformable registration system. Patch shifts are regularized by limits and then upscaled or interpolated across the image. In the current source, interpolation is controlled explicitly rather than being an unavoidable property of every run.

For difficult one-photon data, CaImAn can high-pass spatially filter frames throughgSig_filtwhile estimating motion. The resulting shifts are then applied to the original data. This can make cell-scale structure more useful for registration when broad background dominates the raw image.

Important parameters include maximum rigid shift, patch size, patch overlap, deviation allowed between local and global shifts, template update behavior, border handling, and whether shift fields are interpolated. Misconfigured values can create locally plausible but biologically damaging corrections. Common warning signs include duplicated edges, stretched footprints, border artifacts, residual activity correlated with movement, and changes in apparent cell shape.

Quality assessment should therefore include more than a mean frame correlation. Direct movie inspection, before-and-after summary images, shift trajectories, border behavior, and downstream footprint stability are all relevant. The taggedmotion-correction sourceis the appropriate reference for exact current behavior.

Current CaImAn motion correction is primarily CPU-oriented. A legacy CUDA option remains visible in parts of the interface but is deprecated and not a dependable current acceleration path. That is worth distinguishing from the package's use of modern machine-learning backends for component classifiers.

5. Memory mapping improves scale, but it is not a bounded-memory guarantee

CaImAn's disk-backed memory-mapped representation is an important engineering feature. It allows the operating system to page required regions into memory instead of requiring the full movie to be loaded eagerly. This made it possible, even in the 2019 study, to process recordings substantially larger than available RAM.

However, "uses memory mapping" and "every operation is out of core" are not equivalent claims. CaImAn still creates working arrays for motion correction, patch extraction, spatial and temporal updates, correlation images, background calculations, component evaluation, and visualization. Some operations can temporarily approach the size of the recording, and some one-photon background configurations are particularly memory intensive.

The physical data layout also matters. Current demos save a C-order memory map for CNMF and reconstruct the movie with explicit dimension and order conventions. Users should not casually transpose or reshape these arrays without respecting CaImAn's layout. Storage order affects both correctness and I/O behavior.

Patch processing reduces the initial optimization problem and permits parallel work, but patches are not only a performance setting. A patch must be large enough to contain a source and enough local background to separate it. The documentation recommends relating patch radius and stride to the expected source size. Too-small patches can truncate components or distort background estimates; very large patches reduce parallelism and increase working memory.

The later full-field refit is scientifically important because it reconciles overlapping patch results, merges candidates, and updates components against the complete data. Patch initialization should not be treated as the final extraction merely because it produced a plausible set of contours.

CaImAn supports multiprocessing andipyparallel, but parallelism can trade lower wall time for higher peak RAM. Lower-level BLAS and OpenMP thread counts can also interact with process-level parallelism. Reproducible performance reports should therefore record process count, thread settings, RAM, storage type, and whether the measured time includes motion correction and file conversion.

6. Initialization and source size remain consequential assumptions

CaImAn exposes several initialization methods because different imaging regimes have different statistics. Current guidance typically favors:

-greedy_roifor many two-photon somatic datasets;

-corr_pnrfor one-photon CNMF-E;

-sparse-NMF-style approaches for some dendritic or axonal recordings;

-seeded initialization when reliable masks or coordinates already exist.

The expected source size, commonly represented throughgSig, is one of the most influential parameters. It affects filtering, candidate detection, morphological expectations, and the spatial support of components. A value appropriate for a high-magnification two-photon recording may be inappropriate after spatial downsampling or for a different optical system.

rfandstridesimilarly influence both detection and compute. They should be reported in pixels together with the effective pixel size after any downsampling. Reporting only the raw acquisition pixel size is not enough if the movie supplied to CaImAn was resized.

Initialization is not ground truth. A candidate can be missed because it never enters the initial dictionary, and a poor candidate can survive long enough to influence neighboring components. Conversely, permissive initialization can produce duplicates that later merging and quality filtering must resolve. A robust workflow should inspect candidate density, patch boundaries, source-size distributions, and the effect of reasonable parameter perturbations.

7. The main output arrays need careful terminology

CaImAn'sEstimatesobject provides a common home for fitted outputs, but the arrays do not all represent the same level of inference.

QuantityDefensible interpretation
AEstimated weighted spatial fluorescence footprints. These are model components, not anatomical cell boundaries.
CEstimated denoised temporal calcium traces associated with the spatial components.
SModel-dependent deconvolved neural activity. It is not an electrophysiological spike train and is not necessarily binary or calibrated in spikes.
YrAComponent-associated residual temporal signal.C + YrAis often used as a noisier trace for inspection.
b,fLow-rank background factors used in standard CNMF configurations.
W,b0Local ring-background quantities used in one-photon configurations.
F_dffA post hoc normalized fluorescence representation populated only after the relevant detrending method is called.
CnA correlation image, when calculated and stored.
accepted/rejected indicesOutcomes of configured quality rules, not verified biological labels.

The current source separatesCfromS, even though some documentation wording has historically blurred "denoised" and "deconvolved." The safest methods language is to callCthe fitted calcium trace andSthe deconvolved activity estimate.

The autoregressive orderpdetermines the temporal calcium model. Settingp=0disables deconvolution. Values such as one or two encode different rise and decay assumptions, and an inappropriate order can create unreliable event estimates. Frame rate, indicator kinetics, source separation, and baseline quality all affect the interpretation ofS.

Normalized fluorescence also needs qualification.F_dffis not an automatic universal output from every CaImAn run. The standard demo callsdetrend_df_fafter component evaluation. Current source documentation treats full DF/F estimation primarily as a two-photon operation, while adetrend_onlyoption exists for one-photon settings where an interpretable baseline fluorescence may not be recoverable. A paper should state the exact function, parameters, component set, and modality rather than simply reporting "CaImAn DF/F."

These definitions are visible in the taggedEstimates source.

8. Automated component evaluation is useful selection, not biological verification

CaImAn evaluates components using several complementary signals:

-a spatial consistency orr_valuemeasure comparing the footprint with activity-related movie structure;

-a temporal signal-to-noise measure;

-an optional CNN score for neuron-like morphology.

The quality logic uses low rejection thresholds and higher evidence thresholds rather than one scalar cutoff. This is a sensible architecture: a component can fail because it is clearly poor on one dimension, while strong evidence on another dimension can support acceptance after minimum criteria are met.

The accepted and rejected lists remain threshold-dependent model outputs. They should not be described as true and false neurons. A component can be a real fluorescent structure but outside the intended class, such as an axon, dendrite, vessel-related feature, or non-somatic source. A genuine weak neuron can also fail temporal criteria.

The CNN is especially domain-sensitive. The original classifier was designed around somatic component morphology. It may be inappropriate for dendritic, axonal, voltage-imaging, volumetric, or substantially different-resolution data. CaImAn allows the CNN criterion to be disabled, which is often preferable to applying a mismatched classifier as though it were a universal cell detector.

Versioning matters here. CaImAn v1.13.0 replaced older TensorFlow-based machine-learning components with Keras and PyTorch equivalents, and the release notes warn that numerical results can change. A reproducible analysis should therefore preserve the CaImAn version, the classifier or model identity, backend versions, and all quality thresholds.CaImAn v1.13.0 release notes

Component merging also needs caution. Spatially related components with sufficiently correlated temporal activity may be merged to correct oversegmentation. Two neighboring neurons can genuinely co-activate, however, so correlation is evidence of duplication rather than proof. Contours and traces should be inspected around aggressive merge settings.

9. OnACID and one-photon online analysis are distinct from batch CNMF

OnACID processes frames sequentially. It can motion-correct incoming data, update the activity of existing components, inspect residual structure for new candidates, add accepted candidates, and distribute spatial updates across later frames. This is a genuine architectural contribution because the source dictionary can evolve during acquisition rather than being fixed in advance.

Online analysis has limitations that are easy to hide in a high-level feature list:

-activity before a component is first detected is not automatically reconstructed in a single forward pass;

-candidate screening, component updates, and quality rules differ from the batch pipeline;

-latency can rise as the component population grows;

-average processing speed does not establish suitability for closed-loop control;

-one-photon online processing uses additional background machinery and should be distinguished from standard two-photon OnACID.

The 2019 whole-brain zebrafish demonstration is strong evidence that the architecture can scale. It processed a roughly 380 GB, 45-plane, 30-minute recording and identified 66,108 components in 21 minutes, including initialization. But the run used a nine-node cluster, with substantial CPU and memory resources at each node. The result was assessed visually rather than against cell-level ground truth. It does not show that every recording will run faster than acquisition on a laptop, nor does it establish closed-loop latency.

A serious online benchmark should report per-frame latency distributions, candidate-detection delay, initialization time, memory growth, delayed-frame behavior, hardware, and the number of active components. Total runtime alone can conceal occasional multi-second stalls.

10. Multi-session registration produces hard assignments, not identity probabilities

CaImAn can align fields of view, compare component footprints using an intersection-over-union-derived distance, and solve pairwise assignments with the Hungarian algorithm. Multi-session registration progressively builds a union of components as later sessions are added.

This is a stronger method than simple nearest-centroid matching, but the result is still a hard algorithmic assignment controlled by alignment quality and matching thresholds. It does not quantify the posterior probability that two footprints represent the same biological cell.

Longitudinal changes in depth, focus, illumination, footprint shape, tissue geometry, field rotation, and segmentation boundaries can reduce overlap. Crowded fields can create competing matches. Progressive union construction also means session order should be recorded and, for sensitive analyses, tested.

Registration output should therefore be inspected and reported with alignment settings, thresholds, session order, unmatched populations, and any manual corrections. It is better described as an estimated cross-session correspondence than as confirmed cell identity. The currentmulti-session registration notebookdocuments the implemented procedure.

11. The validation record is strong but narrower than broad platform claims

CaImAn's 2019 paper supplied unusually substantial validation for scientific imaging software. The evidence is best read as several separate tests rather than one universal accuracy result.

Consensus two-photon benchmark

Nine in vivo mouse two-photon datasets were independently annotated by three or four people. Disagreements were reconciled into consensus masks, which were then adapted through seeded CaImAn processing for comparison. The target class was active, soma-like neuronal components, not every fluorescent biological structure.

Human agreement with the final consensus varied across datasets. With one global parameter configuration, batch and online CaImAn achieved mean F1 scores of approximately 0.754 and 0.762, respectively. Dataset-specific optimization of online parameters produced F1 scores from about 0.72 to 0.85, with a mean near 0.78. Human annotators generally remained more accurate against the consensus reference.

This supports the conclusion that CaImAn approached expert annotation performance for the tested active somatic two-photon data. It does not establish universal near-human detection across one-photon movies, dendrites, axons, volumetric imaging, every indicator, or current v1.13.2 defaults.

Python versus MATLAB CNMF-E agreement

The paper compared CaImAn's one-photon implementation with the reference MATLAB CNMF-E implementation on a 6,000-frame striatal recording. The component sets had an F1 agreement of 0.89, with 573 shared components and a median temporal correlation of 0.86 among shared results.

That is meaningful implementation agreement. It is not absolute cell-level ground truth: both algorithms could agree on an error, and each implementation also produced unique components.

Historical Suite2p comparison

The 2019 study compared CaImAn with the then-current MATLAB Suite2p implementation. The comparison used a limited parameter search, did not retrain Suite2p's default classifier, and excluded one dataset where Suite2p did not converge. The reported F1 values therefore describe that historical configuration, not current CaImAn versus current Suite2p.

Scaling experiments

The paper demonstrated approximately linear scaling with recording duration under the tested conditions and reported processing an approximately hour-long, 105 GB recording in under three hours on an eight-core, 16 GB MacBook. The timing excluded motion correction. Larger and online experiments used workstation or cluster resources.

These results validate the importance of memory mapping, patch processing, and parallelism. They should not be turned into a hardware-independent throughput claim.

The primary source remains the2019 CaImAn paper in eLife. Current software behavior should additionally be checked against the v1.13.2 source because the package has changed materially since publication.

12. Current software maturity, installation, and provenance

As of August 11, 2026, the latest tagged release isCaImAn v1.13.2, released July 28, 2026. The release includes fixes involving NumPy 2 behavior, ROI and contour logic, visualization, motion-shift interpolation, piecewise indexing, and VolPy training. The preceding v1.13.1 release introduced the beginnings of a provenance mechanism for CNMF and OnACID HDF5 results.v1.13.2 release notes

The provenance work is explicitly limited. Saving an HDF5 object does not automatically preserve input hashes, every external memory map, the full package environment, hardware settings, manual decisions, or all derived exports. An immutable external analysis manifest is still advisable.

The project recommends a Miniforge/conda installation for most users. Source or pip-based installation is available but less tested and may require a C++ compiler. CaImAn is advanced scientific software, not a lightweight pure-Python package. The main workflow remains script- and notebook-oriented. A GUI exists, but current documentation describes it as experimental and limited; it should not be presented as a polished no-code interface.

The package supports a wide range of inputs and result persistence, including TIFF, common video containers, NumPy formats, HDF5-family stores, Zarr/N5, Scanbox, SIMA, CaImAn memory maps, HDF5 result objects, and an NWB export helper. Format support does not guarantee that every acquisition's metadata are preserved automatically, so exported files should be validated.

CaImAn is distributed under GPL version 2 or, at the user's option, a later GPL version. The current package metadata classifies it as production/stable, and its 2026 release activity shows active maintenance rather than a frozen 2019 codebase.Tagged README license notice

Reproducible reporting checklist

A defensible CaImAn methods section should record at least:

-CaImAn version, Git commit, Python version, and environment lock or package list;

-input filenames and hashes, frame rate, dimensions, dtype, pixel size, and any prior resizing;

-rigid or piecewise-rigid NoRMCorre settings, high-pass filtering, border handling, template settings, and shift interpolation;

-memory-map creation command, storage order, temporary-file location, and disk type;

-modality and workflow: two-photon CNMF, one-photon CNMF-E, OnACID, OnACID-E, seeded, volumetric, or another variant;

-initialization method,gSig,gSiz, patch radius, stride, component count assumptions, and one-photon ring settings;

-temporal model order, deconvolution settings, decay assumptions, and whether patch-stage deconvolution was disabled;

-merge threshold and the stage at which merging occurred;

-spatial, temporal, and CNN quality thresholds, classifier identity, backend, and any manual additions or removals;

-exact DF/F or detrending function and parameters;

-process backend, process count, BLAS/OpenMP thread settings, RAM, CPU, GPU use where applicable, and storage hardware;

-online initialization, epochs, candidate thresholds, and latency measurements for streaming work;

-registration alignment settings, thresholds, session order, and manual corrections;

-saved HDF5 provenance plus an external manifest recording inputs, outputs, and curation decisions.

Overall conclusion

CaImAn remains one of the most capable open-source platforms for computational calcium imaging. Its value comes from the combination of scientific models and systems engineering: NoRMCorre addresses motion; CNMF and CNMF-E address source separation and background; OASIS provides efficient temporal inference; memory mapping and patches extend workable data size; quality metrics reduce manual burden; OnACID supports streaming experiments; and registration enables longitudinal analysis.

The strongest criticism is not that these components are poorly designed. It is that their integration can make consequential assumptions look like routine settings. Two analyses can both be called "CaImAn" while using different background models, temporal orders, patch geometry, candidate classifiers, quality thresholds, and curation rules.

CaImAn should therefore be treated as a mature modeling framework, not a push-button truth generator. Its automated outputs are most trustworthy when the workflow is documented precisely, parameters are checked against the preparation, intermediate results are inspected, and current software behavior is separated from historical benchmark claims.

That narrower conclusion is also the stronger one. CaImAn does not remove the need for scientific judgment. It gives researchers a sophisticated, scalable, and increasingly reproducible structure in which to exercise it.