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

Function rename_labels

tools/imglab/src/main.cpp:245–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243// ----------------------------------------------------------------------------------------
244
245void rename_labels (
246 dlib::image_dataset_metadata::dataset& data,
247 const std::string& from,
248 const std::string& to
249)
250{
251 for (unsigned long i = 0; i < data.images.size(); ++i)
252 {
253 for (unsigned long j = 0; j < data.images[i].boxes.size(); ++j)
254 {
255 if (data.images[i].boxes[j].label == from)
256 data.images[i].boxes[j].label = to;
257 }
258 }
259
260}
261
262// ----------------------------------------------------------------------------------------
263

Callers 1

mainFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected