Loading autocnet/matcher/matcher.py +2 −2 Original line number Diff line number Diff line Loading @@ -148,7 +148,7 @@ class OutlierDetector(object): the matches dataframe stored along the edge of the graph containing matched points with columns containing: matched image name, query index, train index, and descriptor distance descriptor distance. ***Will only work as expected if matches already has dropped duplicates*** ratio: float the ratio between the first and second-best match distances Loading @@ -164,7 +164,7 @@ class OutlierDetector(object): #0.8 is Lowe's paper value -- can be changed. mask = [] temp_matches = matches.drop_duplicates() #don't want to deal with duplicates... for key, group in temp_matches.groupby('source_idx'): #change to searchId? for key, group in temp_matches.groupby('source_idx'): #won't work if there's only 1 match for each queryIdx if len(group) < 2: mask.append(True) Loading autocnet/matcher/tests/test_matcher.py +0 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,6 @@ class TestOutlierDetector(unittest.TestCase): self.outliers = matcher.OutlierDetector() def test_distance_ratio(self): #TODO: write real test self.assertTrue(len(self.outliers.distance_ratio(self.matches)), 13) def test_self_neighbors(self): Loading Loading
autocnet/matcher/matcher.py +2 −2 Original line number Diff line number Diff line Loading @@ -148,7 +148,7 @@ class OutlierDetector(object): the matches dataframe stored along the edge of the graph containing matched points with columns containing: matched image name, query index, train index, and descriptor distance descriptor distance. ***Will only work as expected if matches already has dropped duplicates*** ratio: float the ratio between the first and second-best match distances Loading @@ -164,7 +164,7 @@ class OutlierDetector(object): #0.8 is Lowe's paper value -- can be changed. mask = [] temp_matches = matches.drop_duplicates() #don't want to deal with duplicates... for key, group in temp_matches.groupby('source_idx'): #change to searchId? for key, group in temp_matches.groupby('source_idx'): #won't work if there's only 1 match for each queryIdx if len(group) < 2: mask.append(True) Loading
autocnet/matcher/tests/test_matcher.py +0 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,6 @@ class TestOutlierDetector(unittest.TestCase): self.outliers = matcher.OutlierDetector() def test_distance_ratio(self): #TODO: write real test self.assertTrue(len(self.outliers.distance_ratio(self.matches)), 13) def test_self_neighbors(self): Loading