datumaro.components.comparator#
Classes
|
Method generated by attrs for class DistanceComparator. |
|
Method generated by attrs for class EqualityComparator. |
Class for comparing datasets and generating comparison report table. |
- class datumaro.components.comparator.DistanceComparator(iou_threshold=0.5)[source]#
Bases:
object
Method generated by attrs for class DistanceComparator.
- class datumaro.components.comparator.EqualityComparator(*, match_images: bool = False, ignored_fields=_Nothing.NOTHING, ignored_attrs=_Nothing.NOTHING, ignored_item_attrs=_Nothing.NOTHING, all=False)[source]#
Bases:
object
Method generated by attrs for class EqualityComparator.
- class datumaro.components.comparator.TableComparator[source]#
Bases:
object
Class for comparing datasets and generating comparison report table.
Method generated by attrs for class TableComparator.
- compare_datasets(first: Dataset, second: Dataset, mode: str = 'all') Tuple[str, str, str, Dict] [source]#
Compares two datasets and generates comparison reports.
- Parameters:
first – The first dataset to compare.
second – The second dataset to compare.
- Returns:
A tuple containing high-level table, mid-level table, low-level table, and a dictionary representation of the comparison.
- static save_compare_report(high_level_table: str, mid_level_table: str, low_level_table: str, comparison_dict: Dict, report_dir: str) None [source]#
Saves the comparison report to JSON and text files.
- Parameters:
high_level_table – High-level comparison table as a string.
mid_level_table – Mid-level comparison table as a string.
low_level_table – Low-level comparison table as a string.
comparison_dict – A dictionary containing the comparison data.
report_dir – A string representing the directory to save the report files.