Turi Create  4.0
turi::object_detection::data_iterator Class Referenceabstract

#include <toolkits/object_detection/od_data_iterator.hpp>

Classes

struct  parameters
 

Public Member Functions

virtual std::vector< neural_net::labeled_imagenext_batch (size_t batch_size)=0
 
virtual bool has_next_batch () const =0
 
virtual const std::vector< std::string > & class_labels () const =0
 
virtual size_t num_instances () const =0
 

Detailed Description

Pure virtual interface for classes that produce batches of data (pre-augmentation) from a raw SFrame.

Definition at line 26 of file od_data_iterator.hpp.

Member Function Documentation

◆ class_labels()

virtual const std::vector<std::string>& turi::object_detection::data_iterator::class_labels ( ) const
pure virtual

Returns a sorted list of the unique "label" values found in the annotations.

Implemented in turi::object_detection::simple_data_iterator.

◆ has_next_batch()

virtual bool turi::object_detection::data_iterator::has_next_batch ( ) const
pure virtual

Returns true when next_batch will return a non-empty value.

Implemented in turi::object_detection::simple_data_iterator.

◆ next_batch()

virtual std::vector<neural_net::labeled_image> turi::object_detection::data_iterator::next_batch ( size_t  batch_size)
pure virtual

Returns a vector whose size is equal to batch_size.

If repeat was set in the parameters, then the iterator will cycle indefinitely through the SFrame over and over. Otherwise, the last non-empty batch may contain fewer than batch_size elements, and every batch after that will be empty.

The x,y coordinates in the returned annotations indicate the upper-left corner of the bounding box.

Implemented in turi::object_detection::simple_data_iterator.

◆ num_instances()

virtual size_t turi::object_detection::data_iterator::num_instances ( ) const
pure virtual

Returns the number of annotations (bounding boxes) found across all rows.

Implemented in turi::object_detection::simple_data_iterator.


The documentation for this class was generated from the following file: