turicreate.image_classifier.annotate¶
-
turicreate.image_classifier.
annotate
(data, image_column=None, annotation_column='annotations')¶ Annotate images using a GUI assisted application. When the GUI is terminated an SFrame with the representative images and annotations is returned.
Parameters: - data : SArray | SFrame
The data containing the input images.
- image_column: string, optional
The name of the input column in the SFrame that contains the image that needs to be annotated. In case data is of type SArray, then the output SFrame contains a column (with this name) containing the input images.
- annotation_column : string, optional
The column containing the annotations in the output SFrame.
Returns: - out : SFrame
A new SFrame that contains the newly annotated data.
Examples
>>> import turicreate as tc >>> images = tc.image_analysis.load_images("path/to/images") >>> print(images) +------------------------+--------------------------+ | path | image | +------------------------+--------------------------+ | /Users/username/Doc... | Height: 1712 Width: 1952 | | /Users/username/Doc... | Height: 1386 Width: 1000 | | /Users/username/Doc... | Height: 536 Width: 858 | | /Users/username/Doc... | Height: 1512 Width: 2680 | +------------------------+--------------------------+ [4 rows x 2 columns]
>>> images = tc.image_classifier.annotate(images) >>> print(images) +------------------------+--------------------------+-------------------+ | path | image | annotations | +------------------------+--------------------------+-------------------+ | /Users/username/Doc... | Height: 1712 Width: 1952 | dog | | /Users/username/Doc... | Height: 1386 Width: 1000 | dog | | /Users/username/Doc... | Height: 536 Width: 858 | cat | | /Users/username/Doc... | Height: 1512 Width: 2680 | mouse | +------------------------+--------------------------+-------------------+ [4 rows x 3 columns]