Development of Python-based 2D section -> 3D atlas registration tool

Hi @acrevenna,

Thanks for your interest! Unfortunately it’s not available yet… As I mentioned in the ‘advertising tweet’, it should be released early 2021 (I hope end of January). It’s almost ready at the moment but there’s no documentation and the installation is tedious. It should be polished a bit more before frustrating interested users :wink:



1 Like

Dear @NicoKiaru,

that would be a very nice late Christmas present to all my users. Please do let me know. I plan to install it myself on several virtual machines and then give access to users.

thanks for developing a great tool and merry Christmas,


1 Like

Hi Nicolas,

Thanks for developing such a great tool! I am really interested in it since I am working on 3D reconstruction recently. I am wondering whther it also works to complete 3D volume reconstruction? If not, can you by chance give me some suggestions?

If you have whole-brain images, then brainreg is the 3D companion to slicereg (which can now be found here).

If you have other 3D volumes, its a bit harder, but I think there have been a few tools suggested on this forum.

Thank you very much!

Hey guys :slight_smile:
We’ve been working on a deep learning based tool for automatic alignment of whole mouse brain histological sections, we are calling it DeepSlice. I would love it if you checked it out and provided some feedback. We have created a web interface for our tool.
Alignments are viewable in QuickNII (NITRC: QuickNII - Serial section aligner to volumetric atlases: Tool/Resource Info) and at present it only works with the Allen mouse brain atlas. Just upload your low-res sections to DeepSlice (300x300 resolution is recommended) and it will return the QuickNII XML file. Simply place this XML in the same directory as your images and open it up with QuickNII to check out the predictions.

We are keen to collaborate if anyone has any ideas about how we can improve and are writing up this project at the moment. Contact me at, I am a masters student in the McMullan lab group at Macquarie University, Sydney, Australia.

all the best,


P.S dont worry about the terms and conditions box, this is just a placeholder. there are no terms and conditions and this tool is going to be open-source.


@PolarBean this is so freaking awesome and fast!! Wonderful! Congrats! If only I could put more likes!


Im glad you had a good experience! Another note on usage is DeepSlice assumes all slices are from the same brain so be sure to upload one brain at a time. We are also contactable on twitter at

1 Like

Also let me know if DeepSlice fails on any brains. If so, DeepSlice is capable of learning from its mistakes so if youre comfortable sharing your data, you can email me ( with your downsampled data and a corrected QuickNII alignment file. This can then be fed back into DeepSlices training :slight_smile:


GAD67-99 GFP 488 NeuN 594 DAPI 405.lif_s6_ch01-1

Very impressive! My first attempt worked.


Hey Harry @PolarBean,

if you need more data for training/testing, feel free to use these data! It’s an open access repository with approx. 1.8TB of brain slices and Atlas data. I wrote my own tool to register the data but I suspect that your method absolutely outperforms mine. I’d be happy to see how it works!

Also, two questions:

  • From what I see, it seems like deep slice assumes all input images to be axial brain sections and deep slice tries to align in the axial plane by default? The data I work with (see above repository) is mostly from coronal sections so I am getting some shonky results. (see picture below)
  • How would you suggest to proceed with large scale data? My images are usually 20k x 20k in size - so downsampling, saving as jpg and uploading works in this case, but is it possible to work with the whole images as input?

Thanks in advance!


I cant tell you how helpful that repository is, We always need more data, especially high quality alignments so that is fantastic. Thank you!

At present DeepSlice only works with coronal sections, not sagittal or axial but thats just due to the training data. We hope to build a version that can align all orientations soon. I cant really see too well in the image you posted but your section looks axial? Im keen to see how DeepSlice performs on your coronal data.

As for downsampling large sections, this is primarily so as we dont crush our bandwidth limits. DeepSlice is actually a python package and when we release it, it will work on full resolution images but I would still recommend downsampling as this is necessary to open your sections in QuickNII. @NicoKiaru is working on this functionality for his ABBA tool which should streamline the process.

Thank you again for the data, I will update you on how I go integrating this with our training set.


Hi Harry @PolarBean,

I think we may be using different naming conventions. I would refer to the above-posted images by Jan

Very impressive! My first attempt worked.

as axial slices. The data I use generally look like this, to which I would refer as coronal slices. So - glad to be able to help out :slight_smile: