Skip to main content

Polarini Focusini project logo

Polarini Focusini

Automated in-focus region detector that blends monocular depth estimation with classic frequency-domain (Difference of Gaussian - DoG) sharpness cues.

Example

Example how in-focus part of photo is detected

What happens under the hood

  1. Runs Depth-Anything V2 to get floating-point depth.
  2. Builds a 3-level Gaussian pyramid and two Difference-of-Gaussians (DoG) maps.
  3. Applies Non-Maximum Suppression in space and across scales.
  4. Keeps only strong extrema → votes for focus → finds dominant depth bins.
  5. Saves every intermediate step to a per-image debug/ folder for easy inspection.

Live coding walkthrough 🎬

Watch the 90-minute live “vibe-coding” session that produced this repo (English code + English subs + Russian-language commentary):

Link to youtube live coding sessions playlist

Please cite ⭐

@misc{poliarnyi2025,
  title        = {Polarini Focusini: open-source pipeline for in-focus region detection},
  howpublished = {\url{https://github.com/UnicornGlade/PolariniFocusini}},
  author       = {Poliarnyi, N.},
  year         = {2025},
  note         = {YouTube demo: “Finding Focus in Photos Using Depth Anything and DoG”}
}

Stars, forks, issues – all very welcome!

Metadata

Release files for polarini-focusini 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for polarini-focusini 0.1.3
File Size Uploaded
polarini_focusini-0.1.3.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for polarini-focusini 0.1.3
File Interpreter ABI Platform
polarini_focusini-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 25.7 kB

Release files / polarini_focusini-0.1.3.tar.gz

Download URL polarini_focusini-0.1.3.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1711ea2dc080a3bd26bd200e0af977f506ee19a7af6a454434455931b4bc6206
BLAKE2b-256 checksum
How to use checksums
41d99d5a10f5819c8b5ac07dbe021d593e7c271ee5a25f1590e74dbbba7b161e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 27, 2025.

Transparency log

Release files / polarini_focusini-0.1.3-py3-none-any.whl

Download URL polarini_focusini-0.1.3-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c11625b779f2b2ffe6db7e55a601582c00c261aff347be25067785d1a1cd7f92
BLAKE2b-256 checksum
How to use checksums
7438f420192fd2d73a649dc9c8bad81eade4675f51e5d57cce74e21f343979d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 27, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page