mirror of https://github.com/davisking/dlib.git
Fixed a bug in --cluster where it would output xml files with empty entries
if the input xml file contained unannotated images.
This commit is contained in:
parent
863fa38439
commit
5940c7169c
|
@ -179,10 +179,10 @@ int cluster_dataset(
|
||||||
unsigned long idx = 0;
|
unsigned long idx = 0;
|
||||||
for (unsigned long i = 0; i < data.images.size(); ++i)
|
for (unsigned long i = 0; i < data.images.size(); ++i)
|
||||||
{
|
{
|
||||||
if (data.images[i].boxes.size() == 0)
|
|
||||||
continue;
|
|
||||||
idata[i].first = std::numeric_limits<double>::infinity();
|
idata[i].first = std::numeric_limits<double>::infinity();
|
||||||
idata[i].second.filename = data.images[i].filename;
|
idata[i].second.filename = data.images[i].filename;
|
||||||
|
if (data.images[i].boxes.size() == 0)
|
||||||
|
continue;
|
||||||
for (unsigned long j = 0; j < data.images[i].boxes.size(); ++j)
|
for (unsigned long j = 0; j < data.images[i].boxes.size(); ++j)
|
||||||
{
|
{
|
||||||
idata[i].second.boxes.push_back(data.images[i].boxes[j]);
|
idata[i].second.boxes.push_back(data.images[i].boxes[j]);
|
||||||
|
|
Loading…
Reference in New Issue