2025 Contest Days

🚻 Restroom

Match male↔female restroom icons from the same restroom β€” embeddings for images.

CVEmbeddingsMetric learningβ˜…β˜…β˜†β˜† embeddings, visual edition

πŸ“œThe task, in plain English

Given restroom door icons, match each male icon to the female icon from the same restroom (same design family/style). It's a matching problem: no classes to predict, just "which of these belongs with which".

InputTwo sets of icon images
OutputA male↔female pairing
Really testsImage embeddings + similarity matching β€” the same embed-and-compare pattern as Chameleon, but visual

πŸ”§The baseline you're given

Embed icons with a pretrained vision encoder, match greedily by cosine similarity. Limitations: greedy matching makes locally-good globally-bad pairs; raw embeddings capture "icon-ness" more than "style".

πŸš€Baseline vs. solution

⚠️ The baseline (what you are given)
  • Off-the-shelf embeddings
  • Greedy nearest-neighbor pairing
  • Duplicate/conflicting matches possible
βœ… The winning approach
  • Global assignment instead of greedy: build the full similarity matrix, solve with scipy.optimize.linear_sum_assignment (Hungarian algorithm) β€” one line, guarantees a consistent 1-to-1 pairing
  • Try several encoders (CLIP-style vs ResNet features) and layers β€” style lives at different depths
  • Simple preprocessing: crop/binarize icons so backgrounds don't dominate similarity

πŸ§’Explain it like I'm brand new

Greedy vs global: greedy matching is speed-dating where the first person picks their favorite and leaves β€” by the end, the remaining people get terrible matches. The Hungarian algorithm considers all pairings at once and maximizes total happiness. In code the upgrade is literally one function: linear_sum_assignment(-similarity_matrix). Knowing that this function exists is worth real points.

πŸ’¬The Gemma 4 playthrough (2000-token limit)

Chat 1 Β· The one-liner that wins
YOU
I have sim, a (n,n) numpy array where sim[i,j] = cosine similarity between male icon i and female icon j. Give ONLY code for the optimal 1-to-1 assignment maximizing total similarity, returning list of (i,j) pairs. Max 6 lines.
GEMMA 4
from scipy.optimize import linear_sum_assignment
import numpy as np

rows, cols = linear_sum_assignment(-sim)   # negate: maximize
pairs = list(zip(rows.tolist(), cols.tolist()))

🎯Takeaways & what Day 1 might do with this

  • Pattern family: embeddings + similarity, plus the matching upgrade (Hungarian algorithm).
  • Encoders are interchangeable parts: text encoder for Chameleon, vision encoder here β€” same downstream code.