cbmi-group / DeepETPicker

GNU General Public License v3.0
22 stars 2 forks source link

DeepETpicker

A deep learning based open-source software with a friendly user interface to pick 3D particles rapidly and accurately from cryo-electron tomograms. With the advantages of weak labels, lightweight architecture and GPU-accelerated pooling operations, the cost of annotations and the time of computational inference are significantly reduced while the accuracy is greatly improved by applying a Gaussian-type mask and using a customized architecture design.

Guole Liu, Tongxin Niu, Mengxuan Qiu, Yun Zhu, Fei Sun, and Ge Yang, “DeepETPicker: Fast and accurate 3D particle picking for cryo-electron tomography using weakly supervised deep learning,” Nature Communications, vol. 15, no. 1, pp. 2090, 2024.

Note: DeepETPicker is a Pytorch implementation.

Setup

Prerequisites

Installation

Option 1: Using conda

The following instructions assume that pip and anaconda or miniconda are available. In case you have a old deepetpicker environment installed, first remove the old one with:

conda env remove --name deepetpicker

The first step is to crate a new conda virtual environment:

conda create -n deepetpicker -c conda-forge python=3.8.3 -y 

Activate the environment:

conda activate deepetpicker

To download the codes, please do:

git clone https://github.com/cbmi-group/DeepETPicker
cd DeepETPicker

Next, install a custom pytorch and relative packages needed by DeepETPicker:

conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=11.0 -c pytorch -y

pip install -r requirement.txt

Option 2:Using docker

The following steps are required in order to run DeepETPicker:

  1. Install Docker

    Note: docker engine version shuold be >= 19.03. The size of Docker mirror of Deepetpicker is 7.21 GB, please ensure that there is enough memory space.

  2. Install NVIDIA Container Toolkit for GPU support.

  3. Download Docker image of DeepETPicker.

    docker pull docker.io/lgl603/deepetpicker:latest
  4. Run the Docker image of DeepETPicker.

    docker run --gpus=all -itd \
            --restart=always \
            --shm-size=100G \
            -e DISPLAY=unix$DISPLAY \
            --name deepetpicker \
            -p 50022:22 \
            --mount type=bind,source='/host_path/to/data',target='/container_path/to/data' \
            lgl603/deepetpicker:latest
  1. The DeepETPicker can be used directly in this machine, and it also can be used by a machine in the same LAN.

    • Directly open DeepETPicker in this machine:

      ssh -X test@'ip_address' DeepETPicker
      # where the 'ip_address' of DeepETPicker container can be obtained as follows:
      docker inspect --format='{{.NetworkSettings.IPAddress}}' deepetpicker
      image
    • Connect to this server remotely and open DeepETPicker software via a client machine:

      ssh -X -p 50022 test@ip DeepETPicker

      Here ip is the IP address of the server machine,password is password.

Installation time: the size of Docker mirror of Deepetpicker is 7.21 GB, and the installation time depends on your network speed. When the network speed is fast enough, it can be configured within a few minutes.

Particle picking tutorial

Detailed tutorials for two sample datasets of SHREC2021 and EMPIAR-10045 are provided. Main steps of DeepETPicker includeds preprocessing, traning of DeepETPicker, inference of DeepETPicker, and particle visualization.

Preprocessing

Training of DeepETPicker


Note: Before `Training of DeepETPicker`, please do `Preprocessing` first to ensure that the basic parameters required for training are provided.

In practice, default parameters can give you a good enough result.

Training parameter description:

Inference of DeepETPicker

In practice, default parameters can give you a good enough result.

Inference parameter description:

Coord format conversion

The predicted coordinates with extension *.coords has four columns: class_id, x, y, z. To facilitate users to perform the subsequent subtomogram averaging, format conversion of coordinate file is provided.

Particle visualization and mantual picking

Troubleshooting

If you encounter any problems during installation or use of DeepETPicker, please contact us by email guole.liu@ia.ac.cn. We will help you as soon as possible.

Citation

If you use this code for your research, please cite our paper DeepETPicker: Fast and accurate 3D particle picking for cryo-electron tomography using weakly supervised deep learning.

@article{DeepETPicker,
  title={DeepETPicker: Fast and accurate 3D particle picking for cryo-electron tomography using weakly supervised deep learning},
  author={Guole Liu, Tongxin Niu, Mengxuan Qiu, Yun Zhu, Fei Sun, and Ge Yang},
  journal={Nature Communications},
  year={2024}
}