Skip to content

Instantly share code, notes, and snippets.

View calebrob6's full-sized avatar

Caleb Robinson calebrob6

View GitHub Profile
@calebrob6
calebrob6 / s2gif.ipynb
Created July 29, 2023 18:42
Make a GIF of Sentinel 2 scenes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@calebrob6
calebrob6 / polygonize_buildings.py
Created July 28, 2023 21:05
A method for performing building polygonization by moving vertices to optimize angles between lines.
import argparse
import os
import fiona
import numpy as np
import rasterio
import rasterio.crs
import rasterio.features
import rasterio.mask
import rasterio.warp
@calebrob6
calebrob6 / Compare distance calculations in different coordinate systems.ipynb
Created July 11, 2023 22:54
Show the calculated distance in meters between three points with the same longitude using different coordinate systems/methods.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@calebrob6
calebrob6 / plot_train_time_by_classes.ipynb
Created June 4, 2023 20:32
Plot how long inference and backpropagation steps take for a U-Net as a function of the number of classes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@calebrob6
calebrob6 / scale-mae_eurosat.ipynb
Created May 24, 2023 03:38
Testing Scale-MAE pretrained weights on EuroSAT.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@calebrob6
calebrob6 / imagenet_datamodule.py
Created May 20, 2023 03:39
Simple datamodule for Imagenet
import torchvision
from lightning.pytorch import LightningDataModule
from torch.utils.data import DataLoader
from torchvision import transforms
class ImagenetDataModule(LightningDataModule):
train_transforms = transforms.Compose(
[
transforms.RandomResizedCrop(224),
@calebrob6
calebrob6 / Detect offshore wind farms with Sentinel 1 RTC.ipynb
Created May 15, 2023 18:40
Script for detecting offshore wind farms with Sentinel-1 RTC data using simple thresholding methods.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@calebrob6
calebrob6 / timm_models_speed_performance_tradeoff.ipynb
Created May 6, 2023 20:05
Plotting the training speed vs. ImageNet top-5 performance results from the timm benchmarks.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@calebrob6
calebrob6 / TorchGeo FastSiam.ipynb
Created April 14, 2023 22:38
An example notebook that shows how to do SSL pretraining with the lightly library and TorchGeo
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.