Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tabler-tdesktop-icons

Matches Tabler Icons (SVG) against a Telegram Desktop / tdesktop-fork icon set (PNG) using SigLIP (ViT-B-16-SigLIP-256) visual + semantic similarity, then rearranges and copies the untouched Tabler SVGs into the exact folder structure and filenames of the original Telegram icon set.

Folder layout

tabler/       ← put the Tabler icons SVG source here (any subfolder depth)
tdesktop/     ← put your fork's existing reference icon PNGs here
               (mirror whatever folder structure tdesktop/Telegram/Resources/icons uses)
icon_matcher.py   ← the matching and rearranging tool
svg2png_qt.py     ← standalone batch SVG→PNG @1x/2x/3x converter (optional, separate use)
requirements.txt
.github/workflows/build-icons.yml   ← CI version of the pipeline below

tabler/ and tdesktop/ are empty except for a .gitkeep — drop your icon sets in before running anything.

Option A: Run it on GitHub (no local setup)

  1. Push this repo to GitHub with your icons added under tabler/ and tdesktop/.
  2. Go to the Actions tab → Build Icon PackRun workflow (or just push a change under either folder — it triggers automatically).
  3. When it finishes, download the new_icon_pack artifact from the run summary page. It contains the reorganized SVGs (and PNGs, if --emit-png stays on) plus matches_report.csv.

Uses macos-latest (Apple Silicon M-series runners), PyTorch with MPS acceleration, and Homebrew (brew install resvg librsvg) for high-performance rendering and embedding.

Option B: Run it locally

pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install -r requirements.txt
# + a renderer: apt install librsvg2-bin  (or install resvg for higher fidelity)

python icon_matcher.py index --src tdesktop --kind png --out telegram_index.pkl
python icon_matcher.py index --src tabler --kind svg --out tabler_index.pkl
python icon_matcher.py match \
    --ref-index telegram_index.pkl \
    --cand-index tabler_index.pkl \
    --out-dir new_icon_pack \
    --report matches_report.csv \
    --threshold 0.75 \
    --emit-png

Runs fine on a CPU-only laptop (no dedicated GPU required) — expect roughly 15–30 minutes total for a few thousand icons, one-time.

After it runs

  • Always review matches_report.csv before treating the output as final. Matching is similarity-based, not guaranteed correct — rows marked REVIEW scored below the threshold and need a manual look, but spot-check some "confident" matches too.
  • The SVGs in new_icon_pack/ are copied verbatim from Tabler source with no XML/transform modifications, preserving full SVG fidelity.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages