MCPcopy Create free account
hub / github.com/davisking/dlib / parse_annotation_file

Function parse_annotation_file

tools/imglab/src/convert_pascal_xml.cpp:177–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175// ----------------------------------------------------------------------------------------
176
177 void parse_annotation_file(
178 const std::string& file,
179 dlib::image_dataset_metadata::image& img,
180 std::string& dataset_name
181 )
182 {
183 doc_handler dh(img, dataset_name);
184 xml_error_handler eh;
185
186 xml_parser::kernel_1a parser;
187 parser.add_document_handler(dh);
188 parser.add_error_handler(eh);
189
190 ifstream fin(file.c_str());
191 if (!fin)
192 throw dlib::error("Unable to open file " + file);
193 parser.parse(fin);
194 }
195
196// ----------------------------------------------------------------------------------------
197

Callers 1

convert_pascal_xmlFunction · 0.70

Calls 2

errorClass · 0.85
parseMethod · 0.80

Tested by

no test coverage detected