# kevinzakka/spatial-transformer-network

A Tensorflow implementation of Spatial Transformer Networks.

Repository: https://github.com/kevinzakka/spatial-transformer-network
Canonical: https://ross.abutalabs.com/products/spatial-transformer-network
Language: Python
License: MIT
License Family: permissive
Topics: spatial-transformer-network, tensorflow, stn, attention, affine-transformation, convnet
Last push: 2018-06-02T22:13:17+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3525, "days_push": 3014, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1005, forks 266 (observed 2026-09-03T02:15:14.004365+00:00)

## What it is
A TensorFlow implementation of Spatial Transformer Networks, a differentiable module that can be inserted into ConvNet architectures to add geometric invariance via learned affine transformations. It is packaged as a pip-installable `stn` library with a blog tutorial series explaining the underlying concepts.

## Use cases
- add a spatial transformer layer to a tensorflow convnet
- make a cnn invariant to rotation and translation
- learn affine transformations of feature maps without extra supervision
- crop and scale image regions with a differentiable attention module
- implement spatial transformer networks from the jaderberg paper
- upsample or downsample feature maps inside a neural network

## When to choose
- you are building CNNs in TensorFlow 1.x and need a differentiable spatial transformer layer
- you want a minimal, well-documented STN implementation to learn from or extend
- you need learned cropping, translation, or scaling as part of a model

## When to avoid
- you use PyTorch or another framework instead of TensorFlow
- you need actively maintained code compatible with modern TensorFlow 2.x
- you need production-grade, heavily tested computer vision tooling

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning, image-processing
- domain: deep-learning, computer-vision, machine-learning
- platform: python
- tags: spatial-transformer-network, tensorflow, attention, affine-transformation, convnet, neural-network-layers

## Member repositories
- kevinzakka/spatial-transformer-network (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:14.004365+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:13:10.099768+00:00, confidence not recorded.
  - readme: https://github.com/kevinzakka/spatial-transformer-network (fetched 2026-09-03T02:15:14.004365+00:00, sha fd8acae563cd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
