WeijingShi / Point-GNN

Point-GNN: Graph Neural Network for 3D Object Detection in a Point Cloud, CVPR 2020.
MIT License
539 stars 112 forks source link

Logical Bug in the code #99

Open fan-yang1 opened 4 months ago

fan-yang1 commented 4 months ago

Hello! I think there's a logic error in the code, but it doesn't affect the result if you set all "graph_scale" as the same in config file(such as car_auto_T3_train_config / "graph_gen_kwargs" / "level_configs" / "graph_scale": 1). This problem is caused by "edges_list" this variable. For example, edges_list[1][:, 1] is the "order of destination vertex". However, this order number is not in all vertices, but in the selected key vertices. If you use different "graph_scale", some key-vertices(keypoints) are selected from all the vertices of the graph to construct the edges of the graph. That is to say, vertex_coord_list[1].shape[0] != vertex_coord_list[2].shape[0]

Finally, the correction should be made is in models/gnn.py line 364: aggregated_edge_features = self._aggregation_fn( edge_features, keypoint_indices[edges[:, 1]], // but keypoint_indices this argument is NOT_USED tf.shape(input_vertex_features)[0])

WeijingShi commented 4 months ago

Hi Fan,

Thanks for looking into it. Feel free to submit a pull request and I'll take a closer look.

Best, Weijing

On Sat, May 18, 2024 at 7:02 AM fan yang @.***> wrote:

Hello! I think there's a logic error in the code, but it doesn't affect the result if you set all "graph_scale" as the same in config file(such as car_auto_T3_train_config / "graph_gen_kwargs" / "level_configs" / "graph_scale": 1). This problem is caused by "edges_list" this variable. For example, edges_list[1][:, 1] is the "order of destination vertex". However, this order number is not in all vertices, but in the selected key vertices. If you use different "graph_scale", some key-vertices(keypoints) are selected from all the vertices of the graph to construct the edges of the graph. That is to say, vertex_coord_list[1].shape[0] != vertex_coord_list[2].shape[0]

Finally, the correction should be made is in models/gnn.py line 364: aggregated_edge_features = self._aggregation_fn( edge_features, keypoint_indices[edges[:, 1]], // but keypoint_indices this argument is NOT_USED tf.shape(input_vertex_features)[0])

— Reply to this email directly, view it on GitHub https://github.com/WeijingShi/Point-GNN/issues/99, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ6I7UB72CJENF4EA2EE23ZC5NQPAVCNFSM6AAAAABH5PWTLGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYDIMJQGM4TEMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>