Turi Create  4.0
turi::object_detection::simple_data_iterator Class Reference

#include <toolkits/object_detection/od_data_iterator.hpp>

Public Member Functions

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

Detailed Description

Concrete data_iterator implementation that doesn't attempt any parallelization or background I/O.

Definition at line 150 of file od_data_iterator.hpp.

Member Function Documentation

◆ class_labels()

const std::vector<std::string>& turi::object_detection::simple_data_iterator::class_labels ( ) const
inlineoverridevirtual

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

Implements turi::object_detection::data_iterator.

Definition at line 167 of file od_data_iterator.hpp.

◆ has_next_batch()

bool turi::object_detection::simple_data_iterator::has_next_batch ( ) const
inlineoverridevirtual

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

Implements turi::object_detection::data_iterator.

Definition at line 161 of file od_data_iterator.hpp.

◆ next_batch()

std::vector<neural_net::labeled_image> turi::object_detection::simple_data_iterator::next_batch ( size_t  batch_size)
overridevirtual

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.

Implements turi::object_detection::data_iterator.

◆ num_instances()

size_t turi::object_detection::simple_data_iterator::num_instances ( ) const
inlineoverridevirtual

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

Implements turi::object_detection::data_iterator.

Definition at line 171 of file od_data_iterator.hpp.


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