Installation and start-up problems#
Always begin with Help → System check (or python cube.py --check). It names what is missing and the fix.
| Symptom | Cause and fix |
|---|---|
| Launching says CUBE has not been installed | The CUBE environment is missing. Run install_cube.bat (it can be run any number of times). |
install_cube.bat stops with a network message |
A download was interrupted or blocked. Run it again; finished packages are not downloaded again. On a company network, ask IT to allow pypi.org, conda.anaconda.org, github.com and download.pytorch.org. |
The installer says env/requirements-lock.txt was not found |
CUBE was started from inside the ZIP. Right-click the ZIP, choose Extract All…, and run the installer from the extracted folder. |
Windows SmartScreen blocks the .bat file |
Choose More info → Run anyway. The scripts are plain text and can be read in Notepad. |
| Pose tracking is not set up when starting Step 1 | DeepLabCut or PyTorch is missing from the environment. Run install_cube.bat. If you already have DeepLabCut output, start at Step 2. |
| System check: no GPU available | Without an NVIDIA GPU this is expected: everything works and only Step 1 is slow. With a GPU, install the current driver from nvidia.com/drivers (version 580 or newer is required by the GPU build), restart, then run install_cube.bat -Gpu. |
| System check: several OpenCV packages installed | Run install_cube.bat to restore a single OpenCV. |
| CUBE closes immediately or shows an error box | Open CUBE_logs\last_launch_errors.txt, or double-click Launch CUBE (console).bat to read the message in a window. Send it together with the Copy report text from System check. |
| Path too long errors | Keep video folders short and close to the top of a drive, for example a folder called Mouse1 inside a folder called Videos. |
| Disk fills up during a run | Results and corrected videos are large. System check reports free space; choose an output drive with 50 GB or more. |
"No clusters found" after Step 3#
- Read the log: HDBSCAN may have labelled every point as noise. Try a larger
n_neighborsor a smaller minimum cluster size. - Check the tracking quality: open a few keypoint files and confirm that likelihood values are mostly above 0.6.
- If too many frames are being interpolated (see the "% interpolated" line of the log), lower the likelihood threshold.
Low classifier cross-validation accuracy#
- Check that Min cluster frequency is not too low; tiny clusters are hard to classify.
- Keep the class weight on
balanced, which handles unequal cluster sizes. - Look at
umap_3d.html. If all points are in one clump, try a largern_neighborsor a smallermin_dist.
HMM smoothing gives implausibly long bouts#
- Open
hmm_transition_matrix.png. The diagonal should be high (about 0.95 to 0.99) but not 1.0. - Try fewer Baum-Welch iterations, which leave the matrix closer to its prior.
- Compare
*_bout_lengths.csvand*_bout_lengths_hmm.csv. To analyse the raw labels, delete or rename the_hmmfiles.
The number of clusters looks wrong#
- Read the split and merge lines of the run log. Every accepted split or merge is logged, so you can trace which clusters changed and why. A merge refused by the region-aware guard is logged as
REFUSED: region-aware merge guard. - Open
plots/cluster_validity.png(or the Analyser's Cluster Validity mode) to see the values the decisions were based on, andmodel/split_merge_log.jsonfor the fate of every split. - If merging looks too aggressive, lower the merge threshold. If splitting creates tiny, low-confidence fragments, raise the split threshold or reduce the iterations.
- To switch refinement off, set the split threshold and the merge threshold to 0 and rerun.
- With region-aware splitting on, check the
[region-split]lines of the log. Lower the impurity threshold or the minority floor if it looks too conservative, or raise them if it over-splits.
The partition changes a lot between runs#
Look at cluster_stability.png. A low agreement means the embedding itself is seed-sensitive for your data. CUBE then builds a more robust partition automatically (see Reproducibility and Methodology); the log line [CONSENSUS-AUTO] says when it did so and why.
DLC inference fails in Step 1#
- Check the CUDA drivers if you use a GPU, and confirm that DLC works on its own outside CUBE.
- Try with Pooled labels off, then with Smart Adapt off. Adaptation can fail when the videos do not contain enough varied frames. If the log says Pooled adaptation unavailable, CUBE has already fallen back to the standard single-video adaptation on its own.
- Check that OpenCV can read your video files: open one in a video player and try
cv2.VideoCapture(path).isOpened()in Python.
The Analyser shows no animals or empty tables#
- Confirm that the folder you chose contains a
bout_lengthsfolder. - Confirm that it holds
*_bout_lengths_hmm.csvor*_bout_lengths.csvfiles. - File names must end in
_bout_lengths.csvor_bout_lengths_hmm.csv.
Group Predictor shows near-chance accuracy for every model#
Common causes: the groups really are behaviourally similar in this recording context; there are too few animals (fewer than 6 per group is very hard); the group assignments are wrong; or the wrong feature source is selected, in which case try Custom mode with a targeted set of clusters. See GROUP_PREDICTOR_REFERENCE.md for more.
"invalid command name" messages when closing#
These tkinter messages are harmless. A few scheduled screen updates run after their windows were closed. They do not affect results or saved files.