Skip to content

Instantly share code, notes, and snippets.

View bearpelican's full-sized avatar

Andrew Shaw bearpelican

View GitHub Profile
points = [
('L-ALam_Apex', '1', 'blue'),
('L-ALam_Tip', '2', 'yellow'),
('L-ALam_Touch','3', 'red'),
('L-A_eP-Bend', '7', 'orange'),
('L-A_eP-End', '8', 'white'),
('L-A_eP-Top', '6', 'green'),
('R-ALam_Apex', '11', 'blue'),
('R-ALam_Tip', '12', 'yellow'),
('R-ALam_Touch','13', 'red'),
def calc_class_ap(lbls, preds, max_dist=30):
metrics = {}
for c in classes:
metrics[c] = [],[],[]
for img_id,pred_row in preds.items():
lbl_row = lbls[img_id]
#
# Your previous Plain Text content is preserved below:
#
# Design a file system.
# File system only deals with directories
# Handle 3 basic commands.
# mkdir - create 1 or more directories (1 level only)
# ls - list files in current directory
# cd - change directory
# pwd - print working directory
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# AUTOGENERATED! DO NOT EDIT! File to edit: 01_metrics.ipynb (unless otherwise specified).
__all__ = ['gaussian', 'create_window', 'SSIM', 'ssim', 'psnr', 'mutual_information', 'nmi', 'metric_fastai',
'ssim_fastai', 'psnr_fastai', 'nmi_fastai']
# Cell
import torch
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bearpelican
bearpelican / OpenSlide_Tiles.ipynb
Created January 27, 2020 23:59
Simple Notebook to process svs images
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.