COCOJoins
- class cocohelper.joins.COCOJoins[source]
Bases:
object
Enable easy access to different joins of a COCO dataset tables.
- Parameters:
coco_helper – the COCOHelper object representing a COCO dataset.
Method List
extract_anns
(joined_anns)Get annotation view from an annotation dataframe merged with other dataframes.
extract_cats
(joined_cats)Extract cats view from a cats dataframe merged with other dataframes.
extract_imgs
(joined_imgs)Extract imgs view from an imgs dataframe merged with other dataframes.
Attributes List
Returns a left join between anns and cats.
Returns a left join between anns, cats and imgs.
Returns a left join between anns and imgs.
Returns a left join between anns, imgs and cats.
Returns a left join between cats and anns.
Returns a left join between cats, anns and imgs.
Returns a left join between imgs, anns and cats.
Returns a left join between imgs and anns.
Returns a left join between imgs, anns and cats.
Returns a left join between imgs, cats and anns.
Methods Details
- extract_anns(joined_anns)[source]
Get annotation view from an annotation dataframe merged with other dataframes.
Useful to extract columns compatible with standard coco annotations and merge/assign to COCOHelper annotations property.
- Parameters:
joined_anns (DataFrame) – a dataframe that contains at least the standard coco annotations columns.
- Returns:
A dataframe containing only the standard coco annotations columns.
- Return type:
DataFrame
- extract_cats(joined_cats)[source]
Extract cats view from a cats dataframe merged with other dataframes.
Useful to extract columns compatible with standard coco categories and merge/assign to COCOHelper cats property.
- Parameters:
joined_cats (DataFrame) – a dataframe that contains at least the standard coco categories columns.
- Returns:
A dataframe containing only the standard coco categories columns.
- Return type:
DataFrame
- extract_imgs(joined_imgs)[source]
Extract imgs view from an imgs dataframe merged with other dataframes.
Useful to extract columns compatible with standard coco images and merge/assign to COCOHelper imgs property.
- Parameters:
joined_imgs (DataFrame) – a dataframe that contains at least the standard coco images columns.
- Returns:
A dataframe containing only the standard coco images columns.
- Return type:
DataFrame
Attribute Details
- anns_cats
Returns a left join between anns and cats.
- anns_cats_imgs
Returns a left join between anns, cats and imgs.
- anns_imgs
Returns a left join between anns and imgs.
- anns_imgs_cats
Returns a left join between anns, imgs and cats.
- cats_anns
Returns a left join between cats and anns.
- cats_anns_imgs
Returns a left join between cats, anns and imgs.
- cats_imgs_anns
Returns a left join between imgs, anns and cats.
- imgs_anns
Returns a left join between imgs and anns.
- imgs_anns_cats
Returns a left join between imgs, anns and cats.
- imgs_cats_anns
Returns a left join between imgs, cats and anns.