You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for this repository!
Face Detector works fine when there is one face present, but when there are 2 or more Non maximum supression algorithm gets stuck in infinite while loop. It doesn't filter out non-intersecting boxes properly.
I have slightly modified your code in non_maximum_supression.dart to
var picks = <int>[];
while (I.isNotEmpty) {
var ind0 = positions.sublist(positions.length - 1, positions.length);
var ind1 = positions.sublist(0, positions.length - 1);
var xx1 = _maximum(_itemIndex(_x1, ind0)[0], _itemIndex(_x1, ind1));
var yy1 = _maximum(_itemIndex(_y1, ind0)[0], _itemIndex(_y1, ind1));
var xx2 = _minimum(_itemIndex(_x2, ind0)[0], _itemIndex(_x2, ind1));
var yy2 = _minimum(_itemIndex(_y2, ind0)[0], _itemIndex(_y2, ind1));
var w = _maximum(0.0, xx2 - xx1);
var h = _maximum(0.0, yy2 - yy1);
var inter = w * h;
var o = inter /
(_sum(_itemIndex(area, ind0)[0], _itemIndex(area, ind1)) - inter);
picks.add(ind0[0]);
List<double> newI = [];
List<int> newPositions = [];
o.asMap().forEach((key, value) {
if (value <= threshold) {
newI.add(I[key]);
newPositions.add(positions[key]);
}
});
I = newI;
positions = newPositions;
}
List<Detection> results = [];
for (var pick in picks) {
results.add(detections[pick]);
}
return results;
Thank you for this repository!
Face Detector works fine when there is one face present, but when there are 2 or more Non maximum supression algorithm gets stuck in infinite while loop. It doesn't filter out non-intersecting boxes properly.
I have slightly modified your code in non_maximum_supression.dart to
and also in face_detection_service.dart
It detects and returns multiple boxes for each face present. I hope it helps, thanks again for this project.
The text was updated successfully, but these errors were encountered: