Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
updates: | |
# Maintain dependencies for GitHub Actions | |
- package-ecosystem: "github-actions" | |
directory: "/" | |
schedule: | |
interval: "daily" | |
commit-message: | |
prefix: "chore:" | |
include: "scope" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import sys | |
import os | |
print("Warning: Do not use this for BatchNorm-using models!") | |
model_names = sys.argv[1:] | |
if len(model_names) < 2: | |
print("need at least two models to average") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import SimpleITK as sitk | |
import sys, os | |
if len ( sys.argv ) < 3: | |
print( "Usage: DicomSeriesReader <input_directory> <output_file>" ) | |
sys.exit ( 1 ) | |
print( "Reading Dicom directory:", sys.argv[1] ) | |
reader = sitk.ImageSeriesReader() | |
dicom_names = reader.GetGDCMSeriesFileNames( sys.argv[1] ) | |
reader.SetFileNames(dicom_names) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import torch.nn as nn | |
class Model(nn.Module): | |
def __init__(self): | |
super(Model, self).__init__() | |
self.linear = nn.Linear(1,1) | |
def forward(self, x): | |
y = self.linear(x) |
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
from PIL import Image | |
from xtermcolor import colorize | |
from skimage.exposure import rescale_intensity | |
import argparse | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import scipy.misc | |
PIXEL = ' ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in `find . -name "fake*.png"`; do convert real_samples.png $f +append $f; done | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bbox(img): | |
rows = np.any(img, axis=1) | |
cols = np.any(img, axis=0) | |
rmin, rmax = np.where(rows)[0][[0, -1]] | |
cmin, cmax = np.where(cols)[0][[0, -1]] | |
return slice(rmin, rmax), slice(cmin, cmax) |
NewerOlder