Skip to content

Instantly share code, notes, and snippets.

@catalys1
Created July 11, 2019 23:08
Show Gist options
  • Save catalys1/3ea9f5dee1db03a3131eae01d505f252 to your computer and use it in GitHub Desktop.
Save catalys1/3ea9f5dee1db03a3131eae01d505f252 to your computer and use it in GitHub Desktop.
Tiger warping with thin plate splines
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using matplotlib backend: TkAgg\n",
"Populating the interactive namespace from numpy and matplotlib\n"
]
}
],
"source": [
"%pylab\n",
"%matplotlib inline\n",
"import thinplate_splines as tps\n",
"from pathlib import Path\n",
"import json"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"anno = json.load(Path('data/pose/keypoint_train.json').open())\n",
"img_files = [Path('data/pose/train/') / x['filename'] for x in anno['images']]"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment