Skip to content

Commit

Permalink
correct method
Browse files Browse the repository at this point in the history
  • Loading branch information
gferraro committed Oct 1, 2024
1 parent c6c6abb commit 4131892
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/modelevaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ def metadata_confusion(dir, confusion_file, after_date=None, model_metadata=None
"Remapping %s to %s", human_tag, remapped_labels[human_tag]
)
human_tag = remapped_labels[human_tag]
if human_tag not in labels:
logging.info("Excluding %s", human_tag)
# if human_tag not in labels:
# logging.info("Excluding %s", human_tag)

ai_tags = []
for tag in tags:
Expand All @@ -324,6 +324,8 @@ def metadata_confusion(dir, confusion_file, after_date=None, model_metadata=None
ai_tags.append(tag["what"])

y_true.append(human_tag)
if human_tag not in labels:
labels.append(human_tag)
if len(ai_tags) == 0:
y_pred.append("None")
else:
Expand Down Expand Up @@ -360,7 +362,7 @@ def load_clip_data(cptv_file):
logging.warn("No clip for %s", cptv_file)
return None

if filter_clip(clip, reason, after_date=after_date):
if filter_clip(clip, None,None,reason, after_date=after_date):
logging.info("Filtering %s", cptv_file)
return None
clip.tracks = [
Expand Down

0 comments on commit 4131892

Please sign in to comment.