Elephant Error java.net.ConnectException: Connection refused

Hello,
I recently tried running my cell tracking on Elephant but when I start Predict Spots under plugin options, it shows the error java.net.ConnectException: Connection refused error_log.txt (2.6 KB)

I am attaching the error log generated. I am on Institute’s Wifi using ELEPHANT client on a Windows OS.

Hello @ipgg_user,
thank you for reporting this issue.
Based on the log file, I assume that the ELEPHANT server is not set up properly.
To work with deep learning functionalities (e.g. Predict Spots) on ELEPHANT, you first need to set up the ELEPHANT server in addition to the ELEPHANT client.

If you have a Linux machine with a high-end GPU, please follow the instructions on the user manual.

Otherwise, please follow the instructions below.

  1. Prepare a Google account (if you already have one, you can use it)
  2. Create a ngrok account from the following link.
    ngrok - secure introspectable tunnels to localhost
  3. Open a Colab notebook from this button (You will need to sign in to your Google account)
    Open In Colab
  4. On Goolge Colab, run the command [Runtime > Run all] and select “RUN ANYWAY” in the following box.
    colab-warning
  5. After around 10 minutes, you will find the following box on the bottom of the page.
    ngrok-box
  6. Click the link to open your ngrok account page and copy your authtoken, then paste it to the box above.
    ngrok-authtoken
  7. After inputting your authtoken, you will have many lines of outputs. Scroll up and find the following two lines.
SSH command: ssh -p[your_random_5digits] root@[your_random_value].tcp.ngrok.io
Root password: [your_random_password]
  1. Launch a powershell (Windows) or terminal (Mac&Linux) and run the following command. Please do not forget to replace your_random_5digits and your_random value. When you are asked a password, use the your_random_password found in the previous step.
    (Windows)
ssh.exe -N -L 8080:localhost:80 -o PubkeyAuthentication=no -o TCPKeepAlive=yes -o ServerAliveInterval=30 -p[your_random_5digits] root@[your_random value].tcp.ngrok.io

(Mac&Linux)

ssh -N -L 8080:localhost:80 -o PubkeyAuthentication=no -o TCPKeepAlive=yes -o ServerAliveInterval=30 -p[your_random_5digits] root@[your_random value].tcp.ngrok.io
  1. Launch another powershell (Windows) or terminal (Mac&Linux) and run the following command. Repeat what you did in the previous step.
    (Windows)
ssh.exe -N -L 5672:localhost:5672 -o PubkeyAuthentication=no -o TCPKeepAlive=yes -o ServerAliveInterval=30 -p[your_random_5digits] root@[your_random value].tcp.ngrok.io

(Mac&Linux)

ssh -N -L 5672:localhost:5672 -o PubkeyAuthentication=no -o TCPKeepAlive=yes -o ServerAliveInterval=30 -p[your_random_5digits] root@[your_random value].tcp.ngrok.io
  1. On the ELEPHANT client, run [Plugins > ELEPHANT > Preferences…] and set the dataset dir parameter to elephant-demo. Then, close the window by pressing the OK button.
  2. You need to initialize the deep learning model first by [Plugins > ELEPHANT > Detection > Reset a Seg Model].
  3. Finally, you will be able to run the Predict Spots.
  4. Please follow these instructions for the further steps.

I hope it works for you.

2 Likes

Thank you for the answer. I also wanted to ask if I can apply Elephant for cell shape, besides circular and ellipitical shapes which are shown in the documentation.

ELEPHANT is designed for detecting (and linking) cells using ellipsoid approximation. Unfortunately, it does not support extracting the precise shape.

For segmenting cells in 3D, you can check the following tools, for example.

2 Likes