Detect in-focus regions in images using depth estimation and Difference-of-Gaussian (DoG) extrema voting across depth bins.
Project description
Polarini Focusini
Automated in-focus region detector that blends monocular depth estimation with classic frequency-domain (Difference of Gaussian - DoG) sharpness cues.
Example
What happens under the hood
- Runs Depth-Anything V2 to get floating-point depth.
- Builds a 3-level Gaussian pyramid and two Difference-of-Gaussians (DoG) maps.
- Applies Non-Maximum Suppression in space and across scales.
- Keeps only strong extrema → votes for focus → finds dominant depth bins.
- 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):
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!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file polarini_focusini-0.1.3.tar.gz.
File metadata
- Download URL: polarini_focusini-0.1.3.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1711ea2dc080a3bd26bd200e0af977f506ee19a7af6a454434455931b4bc6206
|
|
| MD5 |
c0c23b40e78eeb59e4fef0e6e2f7f872
|
|
| BLAKE2b-256 |
41d99d5a10f5819c8b5ac07dbe021d593e7c271ee5a25f1590e74dbbba7b161e
|
Provenance
The following attestation bundles were made for polarini_focusini-0.1.3.tar.gz:
Publisher:
publish.yml on UnicornGlade/PolariniFocusini
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polarini_focusini-0.1.3.tar.gz -
Subject digest:
1711ea2dc080a3bd26bd200e0af977f506ee19a7af6a454434455931b4bc6206 - Sigstore transparency entry: 253497908
- Sigstore integration time:
-
Permalink:
UnicornGlade/PolariniFocusini@fc5361bedfdc2569bf59ed3cd4b5dabd05ddfabd -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/UnicornGlade
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fc5361bedfdc2569bf59ed3cd4b5dabd05ddfabd -
Trigger Event:
push
-
Statement type:
File details
Details for the file polarini_focusini-0.1.3-py3-none-any.whl.
File metadata
- Download URL: polarini_focusini-0.1.3-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c11625b779f2b2ffe6db7e55a601582c00c261aff347be25067785d1a1cd7f92
|
|
| MD5 |
ca75345b53817653fc5a62000a24b73d
|
|
| BLAKE2b-256 |
7438f420192fd2d73a649dc9c8bad81eade4675f51e5d57cce74e21f343979d5
|
Provenance
The following attestation bundles were made for polarini_focusini-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on UnicornGlade/PolariniFocusini
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polarini_focusini-0.1.3-py3-none-any.whl -
Subject digest:
c11625b779f2b2ffe6db7e55a601582c00c261aff347be25067785d1a1cd7f92 - Sigstore transparency entry: 253497913
- Sigstore integration time:
-
Permalink:
UnicornGlade/PolariniFocusini@fc5361bedfdc2569bf59ed3cd4b5dabd05ddfabd -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/UnicornGlade
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fc5361bedfdc2569bf59ed3cd4b5dabd05ddfabd -
Trigger Event:
push
-
Statement type: