1 #ifndef TURI_ANNOTATIONS_OBJECT_DETECTION_HPP 2 #define TURI_ANNOTATIONS_OBJECT_DETECTION_HPP 9 #include <visualization/annotation/annotation_base.hpp> 10 #include <model_server/lib/variant.hpp> 11 #include <toolkits/nearest_neighbors/unity_nearest_neighbors.hpp> 13 #include "build/format/cpp/annotate.pb.h" 14 #include "build/format/cpp/data.pb.h" 19 class ObjectDetection :
public AnnotationBase {
21 ObjectDetection() : AnnotationBase(){};
22 ObjectDetection(
const std::shared_ptr<unity_sframe> &data,
23 const std::vector<std::string> &data_columns,
24 const std::string &annotation_column);
28 annotate_spec::MetaData metaData()
override;
30 annotate_spec::Data getItems(
size_t start,
size_t end)
override;
32 annotate_spec::Annotations getAnnotations(
size_t start,
size_t end)
override;
34 bool setAnnotations(
const annotate_spec::Annotations &annotations)
override;
36 void cast_annotations()
override;
38 void background_work()
override;
40 void addAnnotationColumn()
override;
42 void checkDataSet()
override;
44 annotate_spec::Similarity get_similar_items(
size_t index,
45 size_t k = 7)
override;
51 flex_dict _parse_bounding_boxes(annotate_spec::Label label);
52 void _addAnnotationToSFrame(
size_t index,
flex_list label);
55 std::shared_ptr<ObjectDetection>
56 create_object_detection_annotation(
const std::shared_ptr<unity_sframe> &data,
57 const std::vector<std::string> &data_columns,
58 const std::string &annotation_column);
#define BEGIN_CLASS_MEMBER_REGISTRATION(python_facing_classname)
#define IMPORT_BASE_CLASS_REGISTRATION(base_class)
#define END_CLASS_MEMBER_REGISTRATION
std::vector< std::pair< flexible_type, flexible_type > > flex_dict
std::vector< flexible_type > flex_list