Loading autocnet/graph/network.py +2 −2 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ class CandidateGraph(nx.Graph): adjacency_dict[n] = self.neighbors(n) io_json.write_json(adjacency_dict, outputfile) def add_matches(self, source_node, matches): #src node = query node; destination node = train node def add_matches(self, source_node, matches): """ Adds match data to a node and attributes the data to the Loading Loading @@ -79,7 +79,7 @@ class CandidateGraph(nx.Graph): if 'matches' in edge.keys(): df = edge['matches'] edge['matches'] = pd.merge(df, matches, left_on='queryIdx', right_on='trainIdx') #how do we know it does the right thing? edge['matches'] = pd.merge(df, matches, left_on='queryIdx', right_on='trainIdx') else: edge['matches'] = matches Loading autocnet/matcher/matcher.py +1 −4 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ FLANN_INDEX_KDTREE = 1 # Algorithm to set centers, DEFAULT_FLANN_PARAMETERS = dict(algorithm=FLANN_INDEX_KDTREE, trees=3) class FlannMatcher(object): """ A wrapper to the OpenCV Flann based matcher class that adds Loading Loading @@ -55,7 +54,6 @@ class FlannMatcher(object): """ self._flann_matcher.train() #consider changing this back to returning (matches, data_frame) def query(self, descriptor, k=3, self_neighbor=True): """ Loading Loading @@ -89,9 +87,8 @@ class FlannMatcher(object): i.queryIdx, i.trainIdx, i.distance)) data_frame = pd.DataFrame(matched, columns=['matched_to', 'queryIdx', return pd.DataFrame(matched, columns=['matched_to', 'queryIdx',data_frame 'trainIdx', 'distance']) return data_frame #don't throw anything out, just have dataframes and masks #TODO: decide on a consistent mask format to output. Do we want to also accept existing masks and just mask more things? Loading Loading
autocnet/graph/network.py +2 −2 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ class CandidateGraph(nx.Graph): adjacency_dict[n] = self.neighbors(n) io_json.write_json(adjacency_dict, outputfile) def add_matches(self, source_node, matches): #src node = query node; destination node = train node def add_matches(self, source_node, matches): """ Adds match data to a node and attributes the data to the Loading Loading @@ -79,7 +79,7 @@ class CandidateGraph(nx.Graph): if 'matches' in edge.keys(): df = edge['matches'] edge['matches'] = pd.merge(df, matches, left_on='queryIdx', right_on='trainIdx') #how do we know it does the right thing? edge['matches'] = pd.merge(df, matches, left_on='queryIdx', right_on='trainIdx') else: edge['matches'] = matches Loading
autocnet/matcher/matcher.py +1 −4 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ FLANN_INDEX_KDTREE = 1 # Algorithm to set centers, DEFAULT_FLANN_PARAMETERS = dict(algorithm=FLANN_INDEX_KDTREE, trees=3) class FlannMatcher(object): """ A wrapper to the OpenCV Flann based matcher class that adds Loading Loading @@ -55,7 +54,6 @@ class FlannMatcher(object): """ self._flann_matcher.train() #consider changing this back to returning (matches, data_frame) def query(self, descriptor, k=3, self_neighbor=True): """ Loading Loading @@ -89,9 +87,8 @@ class FlannMatcher(object): i.queryIdx, i.trainIdx, i.distance)) data_frame = pd.DataFrame(matched, columns=['matched_to', 'queryIdx', return pd.DataFrame(matched, columns=['matched_to', 'queryIdx',data_frame 'trainIdx', 'distance']) return data_frame #don't throw anything out, just have dataframes and masks #TODO: decide on a consistent mask format to output. Do we want to also accept existing masks and just mask more things? Loading