Skip to content

rguo123/nomads-classifier-pipeline

Repository files navigation

nomads-classifier-pipeline

Nomads classifier with PyMeda and Boss functionality.
This pipeline will:

  1. Pull data from BOSS (assuming correct permissions)
  2. Run Nomads-unsupervised
  3. Run Nomads-classifier
  4. Run PyMeda
  5. Upload results to BOSS (assuming correct permissions to push to channel "collman_nomads" and experiment "nomads_predictions").

How to Run using Docker

Prequisites:
Have Docker installed on machine. Instructions here

Method 1. Run using Jupyter Notebook

  1. Open Terminal

  2. Pull built image from DockerHub by running:

docker pull rguo123/nomads-classifier
  1. Start image with the following command
docker run -it -p 8888:8888 rguo123/nomads-classifier:latest bash

You will ssh into running docker container.

  1. Start notebook with the command:
jupyter notebook --ip 0.0.0.0 --allow-root --no-browser
  1. A url that looks like the following should appear:
Copy/paste this URL into your browser when you connect for the first time,
 to login with a token:
 http://<host>:8888/?token=<long token>

  1. Copy URL into your browser and replace whatever is in with "localhost"
http://localhost:8888/?token=....

You should now be able to access the Nomads-Classifier jupyter notebook. Leave the container running and follow the
instructions in there to run the pipeline!

  1. To get results after your pipeline is done running, press Ctr-C in the docker container. Type:
cd results
  1. You are now inside the results directory and can checkout the results. If you want to move results to your computer follow instructions in this link.

Inside the results directory, you should have NDVis_links.csv which contains links to NDVis, pickled numpy arrays of the predictions, and PyMeda HTML files.

  1. You can exit container by typing exit

Method 2. Run using Python

  1. Go into Terminal (can skip step 1 if you already have image)

  2. Pull built image from DockerHub by running:

docker pull rguo123/nomads-classifier
  1. Start image with the following command
docker run -it rguo123/nomads-classifier:latest bash

You will ssh into running docker container.
3. Run the command

python3 driver.py --host api.boss.neurodata.io --token <insert BOSS API token> --col <insert BOSS collection> --exp <insert  BOSS experiment> --z-range <z_start>,<z_end> --y-range <y_start>,<y_end> --x-range <x_start>,<x_end>
  1. See steps 6 and 7 in Method 1 to retrieve results.

How to run without Docker:

Prequisites: Have python3 and pip3 working on computer.

  1. git clone https://github.com/rguo123/nomads-classifier-pipeline.git
  2. pip3 install -r requirements.txt
  3. Run the command step 3 in Running with Docker Method 2.

About

Nomads classifier with PyMeda and Boss functionality

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published