--- language: - en tags: - neuroscience --- # Omnimouse dataset Repository for the complete Omnimouse dataset. The Omnimouse dataset comprises **>3 million single-neuron recordings** from visual cortex in **78 mice** across **323 sessions**, capturing **>150 billion neural tokens** during presentations of **natural movies**, **natural images**, **parametric stimuli**, and aligned **behavioral measurements**. For more information, see the [OmniMouse paper](https://openreview.net/forum?id=mEw4lhAn0F). ## Additional resources We provide [Experanto](https://github.com/sensorium-competition/experanto), a Python package for working with neuroscience experiments and loading them into torch (including interpolation utilities for recordings and stimuli). Experanto is fully compatible with the Omnimouse data format out of the box and is highly recommended. We also provide the [Sensorium 2023 codebase](https://github.com/ecker-lab/sensorium_2023) and the OmniMouse codebase (TBA), which include tutorial notebooks and baseline models to help you get started. ## Sample download The following Python script demonstrates how to download a single experiment from the dataset. 1. Set the environment variable `HF_TOKEN` to your Hugging Face access token. 2. Run the script in a suitable Python environment (with `huggingface_hub` installed). ```python import os import tarfile from pathlib import Path from huggingface_hub import hf_hub_download # ========================= # Configuration # ========================= HF_TOKEN = os.environ.get("HF_TOKEN") REPO_ID = "the-enigma-project/omnimouse-dataset" # Where you want the extracted experiment locally DOWNLOAD_DIR = Path("data") # Path of the tar file inside the HF repo REMOTE_TAR_PATH = "experiments/dynamic17797-4-7-Video-021a75e56847d574b9acbcc06c675055_30hz.tar" def test_download_and_extract(): print(f"--- Starting download test from {REPO_ID} ---") try: DOWNLOAD_DIR.mkdir(parents=True, exist_ok=True) tar_local_path = hf_hub_download( repo_id=REPO_ID, repo_type="dataset", filename=REMOTE_TAR_PATH, token=HF_TOKEN, local_dir=DOWNLOAD_DIR, ) tar_local_path = Path(tar_local_path) print(f"Downloaded tar to: {tar_local_path}") print("Extracting archive...") with tarfile.open(tar_local_path, "r") as tar: tar.extractall(path=DOWNLOAD_DIR) extracted_root = DOWNLOAD_DIR / tar_local_path.stem print(f"Extraction complete.") print(f"Experiment folder available at: {extracted_root}") except Exception as e: print(f"An error occurred during download or extraction: {e}") if __name__ == "__main__": test_download_and_extract() ``` For a more detailed and customizable download script checkout the download_dataset.py file uploaded in this repo. For further guidance on downloading larger subsets (or the full dataset), see the [Hugging Face Hub download documentation](https://huggingface.co/docs/huggingface_hub/guides/download). ## Data sources and attribution The experiments in the Omnimouse dataset are aggregated from multiple projects and original sources. Please consult the [metadata table](https://enigma-brain.github.io/omnimouse-data-release/dataset_details.html) to identify the originating project(s) for any experiment you use, and cite the corresponding paper(s) accordingly