Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fsw similarity metrics #3

Merged
merged 22 commits into from
Jan 16, 2024
Merged

Conversation

RotemZilberman
Copy link
Contributor

@RotemZilberman RotemZilberman commented Jan 5, 2024

closes #1

Copy link
Contributor

@AmitMY AmitMY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments, but most importantly:
Please run closest_matches to show what this metric actually does.
There are many unjustified numbers in here, but the results could speak for themselves

signwriting_evaluation/metrics/similarity.py Outdated Show resolved Hide resolved
signwriting_evaluation/metrics/similarity.py Outdated Show resolved Hide resolved
signwriting_evaluation/metrics/similarity.py Outdated Show resolved Hide resolved
signwriting_evaluation/metrics/similarity.py Outdated Show resolved Hide resolved
signwriting_evaluation/metrics/similarity.py Outdated Show resolved Hide resolved
signwriting_evaluation/metrics/similarity.py Outdated Show resolved Hide resolved
signwriting_evaluation/metrics/similarity.py Outdated Show resolved Hide resolved
signwriting_evaluation/metrics/similarity.py Outdated Show resolved Hide resolved
signwriting_evaluation/metrics/similarity.py Outdated Show resolved Hide resolved
signwriting_evaluation/metrics/similarity_metrics.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
signwriting_evaluation/metrics/similarity.py Outdated Show resolved Hide resolved
signwriting_evaluation/metrics/test_symbol_distance.py Outdated Show resolved Hide resolved
signwriting_evaluation/metrics/similarity_metrics.md Outdated Show resolved Hide resolved
Copy link
Contributor

@AmitMY AmitMY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost perfect. minor corrections

README.md Show resolved Hide resolved
signwriting_evaluation/metrics/symbol_distance.md Outdated Show resolved Hide resolved
signwriting_evaluation/metrics/symbol_distance.py Outdated Show resolved Hide resolved
signwriting_evaluation/metrics/symbol_distance.py Outdated Show resolved Hide resolved
self.weight["positional"] * dis.euclidean(hyp["position"], ref["position"]))
hyp_class = next((i for i, r in enumerate(self.symbol_classes.values()) if shape1 in r), None)
ref_class = next((i for i, r in enumerate(self.symbol_classes.values()) if shape2 in r), None)
distance = distance + abs(ref_class - hyp_class) * self.weight["class_penalty"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i feel like this might be too lenient - in my opinion, same class = 1, different class = 0

signwriting_evaluation/metrics/symbol_distance.py Outdated Show resolved Hide resolved
@@ -14,45 +14,45 @@ def __init__(self):
super().__init__("SymbolsDistances")
self.symbol_classes = {
'hand_shapes': range(0x100, 0x205),
'contact_symbols': range(0x205, 0x221),
'movement_paths': range(0x221, 0x2FF),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you remove all of them? even if removed, maybe leave them as commented out.

signwriting_evaluation/metrics/symbol_distance.py Outdated Show resolved Hide resolved
hyp_veq = tuple(val * weight for val, weight in zip(hyp_veq, [self.weight["shape"], self.weight["angle"],
self.weight["facing"], self.weight["parallel"],
self.weight["positional"]]))
ref_veq = tuple(val * weight for val, weight in zip(ref_veq, [self.weight["shape"], self.weight["angle"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could also be a function btw weigh_vector

@AmitMY AmitMY merged commit 4e7c6fa into sign-language-processing:main Jan 16, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single-sign rule based evaluation idea
3 participants