Vincentqyw/image-matching-webui

How to get confidence score from images matching

KadriMufti opened this issue · 2 comments

Checklist

  • [X ] I've searched the project's [issues]

❓ Question

I am attempting to use this repo and the webUI to match between photographs of people. How can I get a single confidence score or matching score? I am also unsure if this repo is useful for profile photo matching.

📎 Additional context

The Match Info and Matches Statistics sections of the webUI do not provide a final single score that I need.
E.g.
{"num_raw_matches": 217, "num_ransac_matches": 190 }

Here is a piece of code from my small project.
#Code

predictions = model.predict(testX)
y_pred = np.argmax(predictions, axis=1)  # Convert predictions to class labels

# Convert testY from one-hot encoded to class labels (integers)
y_true = np.argmax(testY, axis=1)

print(classification_report(y_true, y_pred, target_names=le.classes_, digits = 5))

From the information you provided, you can calculate the average match score from feature points, such as those provided by SuperGlue or other nn matches.

matches, confid = pred["matches0"], pred["matching_scores0"]