Skip to content

Instantly share code, notes, and snippets.

View GenevieveBuckley's full-sized avatar

Genevieve Buckley GenevieveBuckley

  • Monash University
  • Melbourne
View GitHub Profile
@GenevieveBuckley
GenevieveBuckley / __init__ndmorph.py
Last active August 31, 2020 09:39
GPU dask-image support for ndmorph
# -*- coding: utf-8 -*-
__author__ = """John Kirkham"""
__email__ = "kirkhamj@janelia.hhmi.org"
import scipy.ndimage
from . import _utils
from . import _ops
@GenevieveBuckley
GenevieveBuckley / minimal_example.ipynb
Created August 7, 2020 15:16
dask bug in meta (map_blocks vs map_overlap)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GenevieveBuckley
GenevieveBuckley / statistics-flowchart.txt
Created June 30, 2020 03:27
Statistics decision making flowchart
Compare means
* Two groups (control vs drug)
* Same subjects measured twice (before/after)
* Pairwise differences normal -> Paired t-test (parametric test)
* Pairwise differences non-normal -> Wilcoxon matched pairs signed rank test (nonparametric test)
* Each subject measured once
* Each group normal and variances equal -> Unpaired t-test (parametric test)
* Each group normal -> Unpaired t-test with Welch's correction (parametric test)
* One or both groups non-normal -> Mann-Whitney test (nonparametric test)
@GenevieveBuckley
GenevieveBuckley / PyConline 2020 proposal.md
Last active February 19, 2021 07:12
scipy Japan 2020 talk proposal

PyConlineAU 2020 https://pretalx.com/pycon-au-2020/talk/review/RP9LMHZUMYZZWUB73ESTKG9SGT9QCBMJ

dask-image: distributed image processing for large data

Abstract

This talk introduces dask-image, a python library for distributed image processing. Targeted towards applications involving large array data too big to fit in memory, dask-image is built on top of numpy, scipy, and dask allowing easy scalability and portability from your laptop to the supercomputing cluster. It is of broad interest for a diverse range of data analysis applications such as video/streaming data, computer vision, and scientific fields including astronomy, microscopy and geosciences. We will provide a general overview of the dask-image library, then discuss mixing and matching with your own custom functions, and present a practical case study of a python image processing pipeline.

Detailed abstract

Image datasets are large, and becoming larger. The widely used benchmark dataset COCO (Common Objects in Context) contains 330,000

@GenevieveBuckley
GenevieveBuckley / benchmark_skimage_nan.ipynb
Created June 25, 2020 01:42
Benchmarking skimage NaN handling
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GenevieveBuckley
GenevieveBuckley / appending_data.py
Created June 16, 2020 00:40
Appending data with napari threads
"""
This script is adapted from https://github.com/napari/napari/blob/master/examples/interactive_scripting.py
Instead of replacing the entire layer data, we want to append to the data stack.
However it produces "WARNING: Cannot make QOpenGLContext current in a different thread"
"""
import numpy as np
import napari
from napari.qt import thread_worker
import time
@GenevieveBuckley
GenevieveBuckley / napari notebook rich display.ipynb
Last active June 3, 2022 21:50
napari notebook rich display
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Useful Slurm commands

Slurm provides a variety of tools that allow a user to manage and understand their jobs. This tutorial will introduce these tools, as well as provide details on how to use them.

Finding queuing information with squeue

The squeue command is a tool we use to pull up information about the jobs in queue. By default, the squeue command will print out the

from __future__ import print_function
import cv2 as cv
import argparse
parser = argparse.ArgumentParser(description='This program shows how to use background subtraction methods provided by \
OpenCV. You can process both videos and images.')
parser.add_argument('--input', type=str, help='Path to a video or a sequence of image.', default='vtest.avi')
parser.add_argument('--algo', type=str, help='Background subtraction method (KNN, MOG2).', default='MOG2')
args = parser.parse_args()