Commit d6cd6a2a authored by Davis King's avatar Davis King

Fixed a bug that crashed imglab when trying to cluster datasets with empty or

really small boxes.
parent 2651becf
......@@ -147,7 +147,7 @@ int cluster_dataset(
for (unsigned long j = 0; j < data.images[i].boxes.size(); ++j)
{
if (data.images[i].boxes[j].ignore)
if (data.images[i].boxes[j].ignore || data.images[i].boxes[j].rect.area() < 10)
continue;
drectangle rect = data.images[i].boxes[j].rect;
rect = set_aspect_ratio(rect, aspect_ratio);
......@@ -187,7 +187,7 @@ int cluster_dataset(
{
idata[i].second.boxes.push_back(data.images[i].boxes[j]);
if (data.images[i].boxes[j].ignore)
if (data.images[i].boxes[j].ignore || data.images[i].boxes[j].rect.area() < 10)
continue;
// If this box goes into cluster c then update the score for the whole
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment