• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ajdnik / imghash / 27193971176
88%
master: 90%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 09 Jun 2026 08:34AM UTC
Jobs 1
Files 60
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Jun 2026 08:32AM UTC coverage: 91.723% (-1.5%) from 93.22%
27193971176

push

github

web-flow
feat: DINOHash (#64)

* feat: add DINOHash perceptual hash with separate weights module

Adds DINOHash, a 96-bit perceptual hash backed by a frozen DINOv2 ViT-S/14
(with register tokens) backbone fused with a PCA-aligned linear head.
Inference runs in pure Go on top of gonum BLAS — no CGO, no ONNX runtime.
Hashes match the proteus-photos compute_hashes_onnx.py reference bit-exact
on 5/6 fixtures; the lena outlier differs by 1 bit due to PIL vs Go
bilinear sub-LSB pixel drift.

Model weights ship in a new sibling module (dinoweights) so importers of
imghash do not pay the ~85 MB embed cost unless they opt in. The
dinoweights module has zero requires beyond the stdlib; production code
exports a single Blob []byte variable consumed via WithSafetensorsBlob.
WithDINOWeights is provided for custom WeightsProvider implementations
(disk, network, alternate format).

ViT inference internals live in internal/vit (layer norm, attention, MLP,
patch embed, model forward). Preprocessing, safetensors parsing, bicubic
positional-embedding interpolation, and weight-map -> model loading live
in internal/dinov2. The root package exposes only the public surface:
DINOHash type, NewDINOHash, Calculate, Compare, Tensor alias,
WeightsProvider, ParseSafetensors, WithSafetensorsBlob, WithDINOWeights,
ErrNoWeights.

* docs: rewrite wiki

* docs: update wiki with dinohash

* docs: fix wiki formating

* fix: resolve lint issues

415 of 509 new or added lines in 14 files covered. (81.53%)

3646 of 3975 relevant lines covered (91.72%)

6751041.68 hits per line

Uncovered Changes

Lines Coverage ∆ File
54
47.57
internal/dinov2/model.go
21
46.15
internal/dinov2/preprocess.go
13
72.92
internal/dinov2/safetensors.go
5
90.0
dinohash.go
1
98.24
-0.51% options.go
Jobs
ID Job ID Ran Files Coverage
1 27193971176.1 09 Jun 2026 08:34AM UTC 60
91.72
GitHub Action Run
Source Files on build 27193971176
  • Tree
  • List 60
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 379188a3 on github
  • Prev Build on main (#26932096494)
  • Next Build on main (#27195007587)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc