All Projects → seung-lab → Alembic

seung-lab / Alembic

Licence: other
A set of tools for elastic image registration in Julia

Projects that are alternatives of or similar to Alembic

Yiakwy.github.io
html js hosted on GitHub
Stars: ✭ 5 (-16.67%)
Mutual labels:  jupyter-notebook
Brawl4d
Let the data fight it out
Stars: ✭ 5 (-16.67%)
Mutual labels:  jupyter-notebook
Stock Market Analysis Using Python Pandas Numpy
- Performed stock market analysis of technology company’s stocks. - Used pandas to get stock information and to visualize different aspects of stock and performed risk analysis of the stock based on its previous performance history.
Stars: ✭ 6 (+0%)
Mutual labels:  jupyter-notebook
Paperlm1
Stars: ✭ 5 (-16.67%)
Mutual labels:  jupyter-notebook
Advertorch
A Toolbox for Adversarial Robustness Research
Stars: ✭ 826 (+13666.67%)
Mutual labels:  jupyter-notebook
Tfidf
Simple TF IDF Library
Stars: ✭ 6 (+0%)
Mutual labels:  jupyter-notebook
Facets
Visualizations for machine learning datasets
Stars: ✭ 6,744 (+112300%)
Mutual labels:  jupyter-notebook
Jupyter Notes
Some notes, taken with jupyter noteboook, about my studies and my interests
Stars: ✭ 6 (+0%)
Mutual labels:  jupyter-notebook
Qmcs.github.io
EECS Society. Queen Mary University of London
Stars: ✭ 5 (-16.67%)
Mutual labels:  jupyter-notebook
Teaching
Website for tutorials
Stars: ✭ 6 (+0%)
Mutual labels:  jupyter-notebook
Modelarts Lab
ModelArts-Lab是示例代码库。更多AI开发学习交流信息,请访问华为云AI开发者社区:huaweicloud.ai
Stars: ✭ 826 (+13666.67%)
Mutual labels:  jupyter-notebook
Basic reinforcement learning
An introductory series to Reinforcement Learning (RL) with comprehensive step-by-step tutorials.
Stars: ✭ 826 (+13666.67%)
Mutual labels:  jupyter-notebook
Ms Agv Car
微軟人工智慧實務工作坊及 CAVEDU 研習課程之無人載具範例程式
Stars: ✭ 6 (+0%)
Mutual labels:  jupyter-notebook
Python misc
Collection of Misc. Python Files
Stars: ✭ 5 (-16.67%)
Mutual labels:  jupyter-notebook
Emet summer workshop
Repository for the North American Summer Meeting of the Econometric Society 2016 workshop
Stars: ✭ 6 (+0%)
Mutual labels:  jupyter-notebook
Oddity
Stars: ✭ 5 (-16.67%)
Mutual labels:  jupyter-notebook
Collaboration
Repo for collaborating on documents
Stars: ✭ 5 (-16.67%)
Mutual labels:  jupyter-notebook
Nazarkav
Persian Sentiment Analysis
Stars: ✭ 6 (+0%)
Mutual labels:  jupyter-notebook
Xen Code Review Analysis
This repository contains the tools and method follow to produce code review dashboards for the Xen community
Stars: ✭ 6 (+0%)
Mutual labels:  jupyter-notebook
Pytest Intro
Intro practice session to py.test
Stars: ✭ 6 (+0%)
Mutual labels:  jupyter-notebook

Build Status

Alembic

ALignment of Electron Microscopy By Image Correlograms A set of tools for elastic image registration in Julia.

Alignment

Register coarsely-aligned sections to each other, and k-nearest neighboring sections, by blockmatching. Filter matches automatically and manually. Cover each section image in a triangle mesh, and globally deform all the meshes elastically to accommodate the correspondences. Render with a piecewise affine transform.

Requirements

Getting started

Setup the Julia wrapper for CloudVolume.

Here's a simple startup script:

using Alembic
load_params(joinpath(homedir), ".julia/v0.6/Alembic/src/params/pinky40_test.json"); # specifies CloudVolume dirs and params
ms = make_stack(); # make meshset given the params specified in the JSON file
match!(ms); # blockmatch between the meshes in the meshset, per the params
elastic_solve!(ms); # relax the spring system
render(ms); # render the images and save to CloudVolume

Task Scheduling

You can schedule and run blockmatching and render tasks in parallel across a cluster. We recommend you use one of the following Docker containers & Kubernetes.

If you'd like to create a container for precompiled Julia+MKL on a different instance type, do the following:

  • On the instance type, install Docker.
  • Clone this repository: git clone https://github.com/seung-lab/Alembic.git
  • cd Alembic
  • docker build -t [TAG NAME] .

Publishing/Subsribing to Tasks

We've included blockmatch and render tasks in src/tasks/tasks.jl, along with task publisher/subscriber scripts based on AWS SQS. We assume that you've setup CloudVolume to include the file ~/.cloudvolume/secrets/aws-secret.json. You can publish tasks in the following manner:

julia ~/.julia/v0.6/Alembic/src/tasks/sqs_publisher.jl [PARAMS JSON PATH] [QUEUE NAME]

You can view your scheduled tasks in the AWS SQS console.

You can setup a queue subscriber in a similar fashion:

julia ~/.julia/v0.6/Alembic/src/tasks/sqs_subscriber.jl [QUEUE NAME] [NO. OF PROCS TO USE]

Pay attention to the Default Visibility Timeout attribute of your SQS queue. You'll want to set it to be longer than the time your task is expected to take. That way, you won't have workers working on the same task simultaneously.

Setting up Kubernetes

Once you have tasks scheduled in the queue, you can set up a cluster that can be managed with Kubernetes. Here's how to do it using Google Container Engine.

First, make sure you have kubectl installed on your local workstation.

Now, create a cluster in Google Cloud (use the console or CLI). We recommend using the following parameters:

Zone: us-east1-b
Cluster Version: 1.7.8-gke.0 (default)
Machine type: 8 vCPU, 30 GB memory
Boot disk size in GB (per node): 32

Creating cluster through gcloud CLI:

gcloud container clusters create your-cluster-name --zone=us-east1-b --machine-type=n1-standard-8 --disk-size=32

Connecting kubectl to cluster through glcoud CLI:

gcloud container clusters get-credentials your-cluster-name 

It's important that you make sure the zone is set to match your storage zone. Size your machine type & boot disk according to the size of your data. Boot disk is not used beyond container installation, but it can become a constraining resource for your entire project, so set it accordingly.

Once your cluster has been created, within the console, select the Connect button to access the kubectl commands to connect your local workstation to your cluster. Now you can mount your secrets to your cluster nodes:

kubectl create secret generic secrets --from-file=$HOME/.cloudvolume/secrets/aws-secret.json --from-file=$HOME/.cloudvolume/secrets/google-secret.json

Now you can intialize the container+commands to be run on each node (we recommend a kube deployment, rather than a job). See deployment.yaml for an example deployment definition.

Note: Alembic uses shared memory (SharedArrays in Julia), which requires some workarounds with containers & deployment services. For Kubernetes, one workaround is to mount a drive to /dev/shm, as described in this post. See deployment.yaml as an example, again.

We can run that deployment with the following command:

kubectl create -f $HOME/.julia/v0.6/Alembic/src/tasks/deployment.yaml

And now you're running on a cluster! If you want to adjust the number of pods that are supporting the deployment, you can use this following command:

kubectl scale deployment alembic-tasks --replicas=[NO. OF PODS]

You can investigate the different Kubernete resources with the following commands:

kubectl describe deployment
kubectl describe pods
kubectl get deployment
kubectl get pods
kubectl logs [POD NAME]  # 

For more commands, see the kubectl Cheat Sheet.

If you ever need to replace the deployment (e.g. you updated the docker container or you want to change the command you pass to the container), just delete the deployment and create a new one.

kubectl delete deployment alembic-tasks
kubectl create -f $HOME/.julia/v0.6/Alembic/src/tasks/deployment.yaml
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].