HiNeuron:An annotated hierarchical neuronal dataset for neuron reconstruction

HiNeuron is a dataset consisting of neuron image data with varying reconstruction difficulties. It currently includes two versions: original HiNeuron and HiNeuron Ver2. The HiNeuron dataset contains data of different difficulty levels, each composed of tens of thousands of image blocks. The data were extracted from fluorescence micro-optical sectioning tomography (fMOST) images that capture diverse morphological features. Data that are easier to reconstruct exhibit simple and well-separated fiber structures, whereas more difficult data contain complex branching, crossings, and densely packed fibers.

In the HiNeuron dataset, all images are divided into three density levels, ranging from low to high density. This dataset includes approximately 2,800 image blocks, each containing neuronal images and their corresponding manually traced results as the ground truth, along with isotropic images obtained through image enhancement techniques.

In the HiNeuron Ver2 dataset, all images are classified into four levels of density, representing increasing reconstruction difficulty from low to high. The dataset contains about 8,092,547 image blocks, each comprising neuronal images and their corresponding manually annotated results as the ground truth.

The voxel resolution of images in both original HiNeuron and HiNeuron Ver2 datasets is 0.35 µm × 0.35 µm × 1 µm or 0.32 µm × 0.32 µm × 1 µm, and the data are stored as 16-bit depth, LZW-compressed TIFF-format 3D images.

The HiNeuron dataset can be used to evaluate the performance of existing neuron reconstruction algorithms and to facilitate the development of new reconstruction methods. The dataset has been publicly released with download links provided, serving as an important foundational resource for future research in neuronal reconstruction. It is freely available for non-commercial research purposes.

HiNeuron dataset with different levels of densities

For questions and additional information, or would like to give us any suggestions, please contact us.

If you would like to use the dataset for commercial purposes, please contact us.
The email address: aali@hust.edu.cn.

Related publication:
Chen, W., Liao, M., Bao, S., An, S., Li, W., Liu, X., Huang, G., Gong, H., Luo, Q., Xiao, C., and Li, A. (2024). A hierarchically annotated dataset drives tangled filament recognition in digital neuron reconstruction. Patterns, 101007.

The HiNeuron dataset, which comprises neuronal images, corresponding gold standard results, and isotropic high-resolution voxel images for each neuronal image block. All the images are 3D in 16-bit format. The HiNeruon dataset is from different specimens, with different neuron data under each folder and each neuron data contains different levels of density. In each level, three folders store the original neuron images, corresponding isotropic images, and reconstructed gold standard results. At the same time, two txt files are provided, providing the image numbers in the dataset, and the direction provides the starting point and direction of the gold standard to be reconstructed in each neuron image block.

HiNeuron dataset information

Specimen Neuron Level1 Level2 Level3 Total number Data size
Specimen1 Neuron1 42 36 41 119 0.98 G
Specimen2 Neuron1 11 0 0 11 0.08 G
Neuron2 17 0 0 17 0.13 G
Specimen3 Neuron1 44 25 11 80 1.32 G
Neuron2 26 22 5 53 0.65 G
Neuron3 27 12 5 44 0.21 G
Neuron4 18 19 17 54 1.12 G
Neuron5 46 24 16 86 1.45 G
Neuron6 27 13 4 44 0.49 G
Neuron7 21 18 8 47 0.42 G
Neuron8 30 4 2 36 0.38 G
Neuron9 25 24 26 75 1.68 G
Neuron10 36 8 4 48 0.50 G
Neuron11 52 33 12 97 2.04 G
Neuron12 29 4 1 34 0.31 G
Neuron13 37 20 8 65 1.44 G
Neuron14 54 20 13 87 1.59 G
Neuron15 10 5 1 16 0.24 G
Neuron16 15 20 13 48 0.56 G
Neuron17 31 24 43 98 2.25 G
Neuron18 42 21 28 91 2.62 G
Neuron19 53 21 20 94 1.75 G
Specimen4 Neuron1 110 27 12 149 0.94 G
Specimen5 Neuron1 18 1 0 19 0.03 G
Neuron2 45 14 0 59 0.10 G
Neuron3 12 7 7 26 0.07 G
Specimen6 Neuron1 38 7 0 45 0.10 G
Neuron2 27 15 0 42 0.12 G
Neuron3 22 19 1 42 0.13 G
Neuron4 27 12 3 42 0.11 G
Neuron5 16 25 5 46 0.15 G
Neuron6 12 9 0 21 0.05 G
Neuron7 20 0 0 20 0.04 G
Neuron8 32 14 0 46 0.14 G
Specimen7 Neuron1 29 34 10 73 0.22 G
Neuron2 64 99 69 232 1.37 G
Neuron3 152 132 20 304 0.84 G
Neuron4 11 129 129 269 1.81 G
Neuron5 12 3 15 30 0.11 G
Total number 1,340 920 549 2,809 28.53 G

HiNeuron dataset comes from two fMOST imaging systems, and there may be differences in image features. Currently, these two types of data are mainly used for single neuron reconstruction:
TDI-fMOST: The image blocks are 3D tiff, and the voxel resolution is 0.35 µm × 0.35 µm × 1 µm. There are 22 data files, totaling 1344 image blocks, and each file is 0.08 GB ~ 2.6 GB.
HD-fMOST: The image blocks are 3D tiff, and the voxel resolution is 0.32 µm × 0.32 µm × 1 µm. There are 17 data files, totaling 1465 image blocks, each file is 0.03 GB ~ 1.8 GB.

In each neuron data folder, there are different levels of data, and in each level of the folder, there will be three folders and two txt files, as follows:
image: the original neuron image block.
image_isotopic: the isotropic image corresponding to each original neuron image block.
swc: the target neurons reconstructed result in each image block.
direction.txt: the initial point and direction of the reconstructed target neuron.
id.txt: the number of all images under this folder.

The HiNeuron dataset can be opened through ImageJ, GTree, and Amira. ImageJ is a public domain software for processing and analyzing scientific images. GTree and Amira can load SWC files that overlap with the target fibers in the neuron image.

The specimen information

Specimen ID fMOST ID Line Gender Age Labeling strategy Imaging system Imaging channel Voxel resolution/µm3
Specimen1 190366 Fezf2-2A-CreER*LSL-FlpO male 5m AAV-TVA-fdio-GFP TDI-fMOST GFP 0.35 x 0.35 x 1
Specimen2 18704 DAT-Cre female \ Dual-AAV vectors; AAV-retro-Cre TDI-fMOST GFP 0.35 x 0.35 x 1
Specimen3 190367 Fezf2-2A-CreER*LSL-FlpO male 5m AAV-TVA-fdio-GFP TDI-fMOST GFP 0.35 x 0.35 x 1
Specimen4 192026 C57BL/6J male 2m AAV-DIO-GFP HD-fMOST GFP 0.32 x 0.32 x 1
Specimen5 194511 C57BL/6J \ 4m AAVretro-CAG-Cre; AAV9-CAG-Flex-GFP HD-fMOST GFP 0.32 x 0.32 x 1
Specimen6 201545 C57BL/6J male \ AAVretro-CAG-Cre; AAV9-CAG-Flex-GFP HD-fMOST GFP 0.32 x 0.32 x 1
Specimen7 230158 PV-Cre male 22m AAV-DIO-YFP HD-fMOST YFP 0.32 x 0.32 x 1

Download
Here is a sample download for the HiNeuron dataset, taking Neuron1 from Specimen1 as an example. Neuron1 includes three folders for each level, and within each level, there are three folders and two txt files. Each level represents a different density of neuronal image. In Level 1, the neuronal image density is relatively low, in Level 2, the neuronal image density is moderate, and in Level 3, the neuronal image density is higher. A sample download.
Download the all of HiNeuron dataset

The HiNeuron dataset is free for academic use only. Anyone can download the dataset through the application.

Cite
When using the dataset, please cite the HiNeuron: Please mention the HiNeuron in the article and refer to the website. For example, "The HiNeuron dataset was accessed from http://brains-atlas.org/res/HiNeuron."
The HiNeuron dataset has different specimens, neurons, and levels.
If the dataset is used, such as Specimen1-Neuron1-Level1, please cite "HiNeuron.1.1.1".
If the specimen is used, such as using Specimen1, please cite "HiNeuron.1".
Please cite explanations based on actual usage data.

For citation of papers, we will supplement the citation of the article after its publication.

Licenses
This dataset is licensed under the Creative Commons Zero (CC0).
If you would like to use the dataset for commercial purposes, please contact us.

News and updates
January 22, 2024: The HiNeuron dataset releases 2,809 image blocks.

The project provides the script for improving the spatial resolution of neuron images to achieve three-dimensional isotropy. The image voxel resolution in the three directions of the xyz is different, and the voxel resolution in the z-axis is lower. Therefore, a high voxel resolution image in the z-axis is obtained through neural network prediction.

AINet
The code is written in Python, and the experiment is based on the HiNeuron dataset. This program is used for axial interpolation of neuron images to obtain isotropic images.

Environment requirements

# This program requies some environment configuration
Nvidia GPU corresponding driver
cuda 9.0
The neural network is developed with the keras, using TensorFlow as the backend.
Python extension packages: numpy, opencv, os, skimage, time.

Functions
# Please give the file paths that include the training and testing images. You can also adjust some parameters for better training or testing on your computer. You need to generate loss and result files.
# Train
run train.py, obtained a trained model.

# Predict
run predict.py, performed image prediction. Based on the trained model, perform image prediction to obtain high-resolution axial images.

The original code for the HiNeuron has been deposited in github under https://github.com/Brainsmatics/HiNeuron and is publicly available as of the date of publication.

Code used for technical validation of the HiNeuron Ver2 Dataset

https://atlas.brainsmatics.cn/HiNeuron/Technical_validation.zip

HiNeuron Ver2 Dataset Download API

API Information

Interface URL: https://atlas.brainsmatics.cn/program/frontend/HiNeuron
Request method: GET
Parameters:
dataCount (int) - Number of brain regions, range 0–10000
taskLevel (int) - Task difficulty level, range 1–4
SavePath (String) - Data download storage path
Return result:
Successfully returns the file brain_data.txt; failure returns HTTP status code and error message.

Note: The downloaded brain_data.txt file contains URLs to the actual resource files. The following examples now include code to parse this file and download all resources.
Parameter Type Description Range
DataCount int Number of brain regions 0–10000
TaskLevel int Task difficulty level 1–4
SavePath String Data download storage path -

Call Examples:

JavaScript
/**
 * ------------------------------------------------------------
 * 🧩 Brain Data Downloader (Pure Node.js)
 * ------------------------------------------------------------
 * Fetches brain data list from the HiNeuron API,
 * saves it as data.txt, then downloads all related
 * .tif and .swc files automatically.
 *
 * ✅ Requirements (Before You Run):
 *    1️⃣ Make sure you have Node.js version 18 or higher installed.
 *        👉 Check with:  node -v
 *    2️⃣ This script runs in Node.js directly (no browser).
 *    3️⃣ Internet access required.
 *
 * ------------------------------------------------------------
 * Run example:
 *    node brain_data_downloader.js
 * ------------------------------------------------------------
 */

import fs from "fs";
import https from "https";
import path from "path";

/**
 * Download a single file via HTTPS
 * @param {string} fileUrl - File download URL
 * @param {string} saveTo - Full path to save file
 */
function downloadFile(fileUrl, saveTo) {
  return new Promise((resolve) => {
    console.log("Downloading:", fileUrl);

    https
      .get(fileUrl, (res) => {
        if (res.statusCode !== 200) {
          console.error(`❌ Failed: ${fileUrl} (HTTP ${res.statusCode})`);
          res.resume(); // Avoid memory leak
          return resolve(false);
        }

        const dir = path.dirname(saveTo);
        fs.mkdirSync(dir, { recursive: true });
        const fileStream = fs.createWriteStream(saveTo);
        res.pipe(fileStream);
        fileStream.on("finish", () => {
          fileStream.close();
          console.log("✅ Saved:", path.basename(saveTo));
          resolve(true);
        });
      })
      .on("error", (err) => {
        console.error("❌ Error:", err.message);
        resolve(false);
      });
  });
}

/**
 * Download brain data resources from HiNeuron API
 * @param {number} dataCount - Number of brain regions
 * @param {number} taskLevel - Task difficulty level
 * @param {string} savePath - Local directory to save files
 */
async function downloadBrainData(dataCount, taskLevel, savePath) {
  try {
    const apiUrl = `https://atlas.brainsmatics.cn/program/frontend/HiNeuron?dataCount=${dataCount}&taskLevel=${taskLevel}`;
    console.log("Fetching data.txt from:", apiUrl);

    // Fetch data.txt content
    const dataTxt = await new Promise((resolve, reject) => {
      https
        .get(apiUrl, (res) => {
          if (res.statusCode !== 200) {
            return reject(new Error(`HTTP ${res.statusCode}`));
          }

          let data = "";
          res.on("data", (chunk) => (data += chunk));
          res.on("end", () => resolve(data));
        })
        .on("error", reject);
    });

    // Save data.txt locally
    fs.mkdirSync(savePath, { recursive: true });
    const dataFile = path.join(savePath, "data.txt");
    fs.writeFileSync(dataFile, dataTxt, "utf-8");
    console.log("✅ Saved data.txt:", dataFile);

    // Parse lines
    const lines = dataTxt
      .split(/\r?\n/)
      .map((l) => l.trim())
      .filter((l) => l);
    console.log(`Found ${lines.length} entries in data.txt`);

    // Download each pair (.tif + .swc)
    for (const line of lines) {
      const bracketIndex = line.indexOf("(");
      if (bracketIndex === -1) continue;
      const idPart = line.substring(0, bracketIndex);
      const parts = idPart.split("_");
      if (parts.length < 3) continue;

      const [brainNum, neuronNum, imageNum] = parts;

      const tifUrl = `https://atlas.brainsmatics.cn/HiNeuron1/${brainNum}/${neuronNum}/3D/image/${imageNum}.tif`;
      const swcUrl = `https://atlas.brainsmatics.cn/HiNeuron1/${brainNum}/${neuronNum}/3D/swc/${imageNum}.swc`;

      await downloadFile(tifUrl, path.join(savePath, `${idPart}.tif`));
      await downloadFile(swcUrl, path.join(savePath, `${idPart}.swc`));
    }

    console.log("✅ All files downloaded successfully to:", savePath);
  } catch (err) {
    console.error("❌ Error:", err.message);
  }
}

// Example usage
downloadBrainData(10, 2, "C:/opt/file2");
Python
import requests
from pathlib import Path

def download_file(url: str, save_to: Path):
    print(f"Downloading: {url}")
    try:
        response = requests.get(url, timeout=30)
        if response.status_code != 200:
            print(f"❌ Failed: {url} (HTTP {response.status_code})")
            return False

        save_to.parent.mkdir(parents=True, exist_ok=True)
        with open(save_to, "wb") as f:
            f.write(response.content)

        print(f"✅ Saved: {save_to.name}")
        return True
    except Exception as e:
        print(f"❌ Error downloading {url}: {e}")
        return False


def download_brain_data(data_count: int, task_level: int, save_path: str):
    try:
        api_url = f"https://atlas.brainsmatics.cn/program/frontend/HiNeuron?dataCount={data_count}&taskLevel={task_level}"
        print(f"Fetching data.txt from: {api_url}")
        resp = requests.get(api_url)
        if resp.status_code != 200:
            print(f"HTTP request failed: {resp.status_code}")
            return False

        save_dir = Path(save_path)
        save_dir.mkdir(parents=True, exist_ok=True)
        data_txt_path = save_dir / "data.txt"
        data_txt_path.write_text(resp.text, encoding="utf-8")

        lines = [line.strip() for line in resp.text.splitlines() if line.strip()]
        print(f"Found {len(lines)} entries in data.txt")

        for line in lines:
            if "(" not in line:
                continue
            id_part = line.split("(")[0]
            parts = id_part.split("_")
            if len(parts) < 3:
                print(f"Invalid line format: {line}")
                continue

            brain_num, neuron_num, image_num = parts
            tif_url = f"https://atlas.brainsmatics.cn/HiNeuron1/{brain_num}/{neuron_num}/3D/image/{image_num}.tif"
            swc_url = f"https://atlas.brainsmatics.cn/HiNeuron1/{brain_num}/{neuron_num}/3D/swc/{image_num}.swc"

            download_file(tif_url, save_dir / f"{id_part}.tif")
            download_file(swc_url, save_dir / f"{id_part}.swc")

        print(f"✅ All files downloaded successfully to: {save_path}")
        return True
    except Exception as e:
        print(f"❌ Error: {e}")
        return False


# 示例调用
if __name__ == "__main__":
    download_brain_data(10, 2, "C:/opt/file")
Java
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.List;

public class BrainDataDownloader {

	/**
	 * Download brain data resources based on data.txt content
	 *
	 * @param dataCount Number of brain regions
	 * @param taskLevel Task difficulty level
	 * @param savePath  Local directory to save files
	 * @return Whether download was successful
	 */
	public static boolean downloadBrainData(int dataCount, int taskLevel, String savePath) {
		try {
			// Build API URL
			String apiUrl = String.format(
					"https://atlas.brainsmatics.cn/program/frontend/HiNeuron?dataCount=%d&taskLevel=%d", dataCount,
					taskLevel);

			System.out.println("Fetching brain_data.txt from API...");
			URL url = new URL(apiUrl);
			HttpURLConnection connection = (HttpURLConnection) url.openConnection();
			connection.setRequestMethod("GET");

			if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
				System.err.println("HTTP request failed: " + connection.getResponseCode());
				return false;
			}

			// Save the downloaded data.txt
			Path tempPath = Paths.get(savePath, "data.txt");
			Files.createDirectories(tempPath.getParent());
			try (InputStream in = connection.getInputStream()) {
				Files.copy(in, tempPath, StandardCopyOption.REPLACE_EXISTING);
			}
			connection.disconnect();

			// Read data.txt lines
			List lines = Files.readAllLines(tempPath);
			lines.removeIf(String::isEmpty);
			System.out.println("Found " + lines.size() + " entries in data.txt");

			// Download resources for each entry
			for (int i = 0; i < lines.size(); i++) {
				String line = lines.get(i).trim();
				int bracketIndex = line.indexOf('(');
				if (bracketIndex == -1)
					continue;

				// Extract prefix before '('
				String idPart = line.substring(0, bracketIndex); // e.g., 231488_61_1236
				String[] parts = idPart.split("_");
				if (parts.length < 3) {
					System.err.println("Invalid line format: " + line);
					continue;
				}

				String brainNum = parts[0];
				String neuronNum = parts[1];
				String imageNum = parts[2];

				// Construct URLs
				String tifUrl = String.format("https://atlas.brainsmatics.cn/HiNeuron1/%s/%s/3D/image/%s.tif", brainNum,
						neuronNum, imageNum);
				String swcUrl = String.format("https://atlas.brainsmatics.cn/HiNeuron1/%s/%s/3D/swc/%s.swc", brainNum,
						neuronNum, imageNum);

				// Download both files
				downloadFile(tifUrl, Paths.get(savePath, idPart + ".tif"));
				downloadFile(swcUrl, Paths.get(savePath, idPart + ".swc"));
			}

			System.out.println("✅ All files downloaded successfully to: " + savePath);
			return true;

		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}
	}

	private static void downloadFile(String fileUrl, Path saveTo) {
		try {
			System.out.println("Downloading: " + fileUrl);
			URL url = new URL(fileUrl);
			HttpURLConnection conn = (HttpURLConnection) url.openConnection();
			conn.setRequestMethod("GET");

			if (conn.getResponseCode() != HttpURLConnection.HTTP_OK) {
				System.err.println("❌ Failed: " + fileUrl + " (HTTP " + conn.getResponseCode() + ")");
				conn.disconnect();
				return;
			}

			try (InputStream in = conn.getInputStream()) {
				Files.copy(in, saveTo, StandardCopyOption.REPLACE_EXISTING);
			}
			conn.disconnect();
			System.out.println("✅ Saved: " + saveTo.getFileName());
		} catch (Exception e) {
			System.err.println("❌ Error downloading " + fileUrl + ": " + e.getMessage());
		}
	}

	// Example usage
	public static void main(String[] args) {
		downloadBrainData(10, 2, "C:\\opt\\file");
	}
}

The HiNeuron Ver2 data block is an extension and enhancement of the original HiNeuron database, with significant differences in both core technology and data content. In HiNeuron Ver2, data are graded based on 11 image-derived indicators, and the grading levels are further refined according to feedback from annotators. Compared with the original HiNeuron grading scheme, the Ver2 framework is more sophisticated and mature. All data in the HiNeuron data block originate from the HiNeuron Ver2 database, and there is a notable difference in data scale between the two. The HiNeuron Ver2 dataset is derived from 10,547 neurons across 258 whole-brain samples and contains 8,092,547 standardized data units with graded difficulty annotations. The HiNeuron Ver2 dataset includes neuronal images and their corresponding ground truth reconstructions. All images are 16-bit 3D data. The dataset is derived from multiple samples, with each folder containing data from different neurons, including both image files and corresponding SWC files. The naming convention for the image and SWC files follows the pattern BrainID_NeuronID_TaskID.tif and BrainID_NeuronID_TaskID.swc to distinguish between different data instances. In addition, a TXT file is provided, which lists the corresponding indices of the images and SWC files, their difficulty levels, as well as the starting point and orientation of the ground truth reconstruction within each neuronal image block.

HiNeuron Ver2 dataset information

HiNeuron Ver2 dataset comes from two fMOST imaging systems, and there may be differences in image features. Currently, these two types of data are mainly used for single neuron reconstruction:
TDI-fMOST:The image blocks are 3D tiff, and the voxel resolution is 0.35 µm × 0.35 µm × 1 µm.
HD-fMOST:The image blocks are 3D tiff, and the voxel resolution is 0.32 µm × 0.32 µm × 1 µm.

In the dataset, data are organized using a two-level folder structure: the first level consists of folders named after the BrainID, and the second level consists of folders named after the NeuronID. Within each NeuronID folder, there are two subfolders and one TXT file, as shown below:
image: the original neuron image block
swc: the target neurons reconstructed result in each image block.
data.txt: Data index, data level, tracing initial direction, and initial point

For the HiNeuron Ver2 dataset, we provide an online visualization tool that allows simultaneous browsing of images and their corresponding reconstructed SWC files. The data can also be opened using software such as ImageJ, GTree, and Amira.

The specimen information


Download
Download via the API provided in the tool

The HiNeuron dataset is free for academic use only. Anyone can download the dataset through the application.

Cite
When using the dataset, please cite the HiNeuron Ver2: Please mention the HiNeuron Ver2 in the article and refer to the website. For example, "The HiNeuron Ver2 dataset was accessed from http://atlas.brainsmatics.org/HiNeuron."
If the dataset is used, such as 201545-4-TaskLevel1, please cite "HiNeuron.201545.4.1".
If the BrainID is used, such as using 201545, please cite "HiNeuron.201545".

For citation of papers, we will supplement the citation of the article after its publication.

Licenses
This dataset is licensed under the Creative Commons Zero (CC0).
If you would like to use the dataset for commercial purposes, please contact us.

News and updates
January 22, 2024: The HiNeuron1 dataset releases 2,809 image blocks.
October 20, 2025: The HiNeuron Ver2 dataset releases 8,092,547 image blocks.