Skip to content

Instantly share code, notes, and snippets.

View nickpeihl's full-sized avatar

Nick Peihl nickpeihl

View GitHub Profile

Pansharpening notes, mid-2021

First posted in August 2021. This is basically a snapshot of my thinking about pansharpening at that time; I’m not making any substantial updates. Last typo and clarity fixes in February 2023.

Preface

This is a collection of notes on how I’ve been approaching convolutional neural networks for pansharpening. It’s an edited version of an e-mail to a friend who had asked about this tweet, so it’s informal and somewhat silly; it’s not as polished as, say, a blog post would be. It’s basically the advice I would give to an image processing hobbyist before they started working on pansharpening.

If you want a more serious introduction, start with the literature review in Learning deep multiresolution representations for pansharpening. Most of the academic work I would recommend is mentioned there.

@IanColdwater
IanColdwater / twittermute.txt
Last active November 17, 2024 02:37
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@nyurik
nyurik / kibana_vega_question_guide.md
Last active June 3, 2020 21:46
How to submit Kibana Vega question

How to submit Kibana Vega question

It is usually very difficult to debug Vega questions without having your data. To make it easier, please follow these steps to include data with your graph when posting:

  • Reduce your data query to the smallest possible dataset, e.g. set the time range to 15 minutes. It will work as long as it is not empty and represents your data well enough.
  • Open Browser Debugger (for Chrome, right click and click Inspect)
  • Switch to the Console tab
  • Copy the right command, paste it in the console at the > symbol and hit enter (check the schema in your graph to see if you use Vega or Vega-Lite)
@nyurik
nyurik / rotating_world_map.hjson
Created November 13, 2018 19:32
Kibana rotating cloropleth world map
{
$schema: https://vega.github.io/schema/vega/v3.json
padding: 10
config: {
kibana: {tooltips: false}
}
signals: [
{
name: rotation
value: 65
@jessfraz
jessfraz / boxstarter.ps1
Last active October 8, 2024 17:58
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <[email protected]>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@nickpeihl
nickpeihl / README.md
Last active January 5, 2023 21:41
Convert GeoJSON FeatureCollection to newline delimited JSON Feature objects

cat data.geojson | jq -c '.features | .[]' > outfile.jsonld

@max-mapper
max-mapper / index.js
Last active March 14, 2017 22:30
read multicast packets from node
var socket = dgram.createSocket({ type: 'udp4', reuseAddr: true })
socket.bind(5004, function () {
socket.addMembership('239.255.42.42', getIpForInterface('en2'))
socket.setMulticastTTL(255)
})
socket.on('message', function (m) {
// m is a buffer
})
"""
First, this was written back when I wrote Python a bit more like C - I know it needs some work! But for setting delimiters,
you can do the following:
my_dataset = data_file(r"path_to_data")
my_dataset.delim_open # gives you the opening delimeter
my_dataset.delim_close # gives you the closing delimeter
"""
import logging
@laurenancona
laurenancona / technocratic-oath.md
Last active February 19, 2021 09:52
technocratic-oath

Technocratic Oath

I swear to fulfill, to the best of my ability and judgment, this covenant:

I will respect the hard-won scientific gains of those physicians in whose steps I walk, and gladly share such knowledge as is mine with those who are to follow.

I will apply, for the benefit of the sick user, all measures which are required, avoiding those twin traps of overtreatment and therapeutic nihilism.

I will remember that there is art to medicine software as well as science, and that warmth, sympathy, and understanding may outweigh the surgeon's knife or the chemist's drug need for another dependency.

# python pca_multiband.py input.jpeg output.tif
# n-band image -> PCA -> n-band TIFF image
# with lots of hackety assumptions
# (e.g., output is same type as input)
from sys import argv
import rasterio as rio
import numpy as np
from sklearn import decomposition