Skip to content

Instantly share code, notes, and snippets.

View calebrob6's full-sized avatar

Caleb Robinson calebrob6

View GitHub Profile
@calebrob6
calebrob6 / jaccard_test.ipynb
Created February 22, 2024 00:01
Verify the behavior of `smp.losses.JaccardLoss`.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@calebrob6
calebrob6 / landcover_analysis_tutorial.ipynb
Created November 14, 2023 23:25
Tutorial notebook showing how to calculate the land cover distribution around a point.
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_object_detection_example.ipynb
Created October 13, 2023 04:10
Short example of object detection training in TorchGeo.
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_rasterdataset_cog.ipynb
Created October 2, 2023 22:27
Demo that shows how to use TorchGeo to do windowed reading from remote COGs.
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.
@calebrob6
calebrob6 / make_legend2.ipynb
Created August 15, 2023 13:49
Another notebook for generating a legend figure from labels and colors
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@calebrob6
calebrob6 / ball_sort_puzzle_dfs.ipynb
Last active August 12, 2024 15:17
Solves a game called "ball sort puzzle" using a depth first search.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@calebrob6
calebrob6 / make_legend.ipynb
Created August 11, 2023 23:29
Simple notebook for creating a high DPI legend out of a list of colors and labels with matplotlib.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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