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:
Davis King 2016-09-18 09:09:39 -04:00
parent 863fa38439
commit 5940c7169c
1 changed files with 2 additions and 2 deletions

View File

@ -179,10 +179,10 @@ int cluster_dataset(
unsigned long idx = 0;
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].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)
{
idata[i].second.boxes.push_back(data.images[i].boxes[j]);