mirror of
https://github.com/wassname/sloth.git
synced 2026-07-02 09:21:35 +08:00
Use intersection/union for overlap computation.
This makes sloth consistent with OKAPI and MOT overlap computation.
This commit is contained in:
@@ -70,7 +70,8 @@ class CopyAnnotationsPlugin(QObject):
|
||||
|
||||
def overlap(self, r1, r2):
|
||||
ia = float(self.area(self.intersect(r1, r2)))
|
||||
return min(ia/self.area(r1), ia/self.area(r2))
|
||||
union = self.area(r1) + self.area(r2) - ia
|
||||
return ia / union
|
||||
|
||||
def intersect(self, r1, r2):
|
||||
x = max(r1[0], r2[0])
|
||||
|
||||
Reference in New Issue
Block a user