You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The COCOStats class has attributes describing the distribution of the class labels in a dataset. One of these attribute is stats.cat_nms_ratios, which returns a dictionary containing the ratios of the categories, using category names as keys. The formula used to compute these ratios can sometimes lead to results not corresponding to the real ratios. Sometimes class labels having zero occurrences in the dataset have a ratio greater than zero. I would like an alternative attribute or method which computes the classes distribution as the following code snippet does:
for cat_id in old_stats.cat_ids_ratios.keys():
occurrencies[cat_id] = COCOStats(ch_old.filter_cats(cat_ids=cat_id)).nb_anns
old_numeric_ratios = {key: occurrencies[key] / total_anns_number for key in occurrencies.keys()}
The formula used above is the ratio among the total number of occurrences. In some cases this computation is preferred to what stats.cat_nms_ratios does.
The text was updated successfully, but these errors were encountered:
The COCOStats class has attributes describing the distribution of the class labels in a dataset. One of these attribute is
stats.cat_nms_ratios
, which returns a dictionary containing the ratios of the categories, using category names as keys. The formula used to compute these ratios can sometimes lead to results not corresponding to the real ratios. Sometimes class labels having zero occurrences in the dataset have a ratio greater than zero. I would like an alternative attribute or method which computes the classes distribution as the following code snippet does:The formula used above is the ratio among the total number of occurrences. In some cases this computation is preferred to what
stats.cat_nms_ratios
does.The text was updated successfully, but these errors were encountered: