Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to adjust the dimension of the feature vector output by the ReID module? #29

Closed
lianghaochen1 opened this issue May 26, 2024 · 2 comments

Comments

@lianghaochen1
Copy link

Hello, I am applying SUSHI to a custom MOT dataset I created, with the dataset format following MOT17. Considering that the target size in my dataset is not large (I resized the ReID box images to 48*96), and there are minimal appearance changes during movement, I wanted to reduce the dimension of the feature vector output by the ReID module. So I modified the "--node_dim" in SUSHI-main/configs/config.py from 2048 to 256.

However, after running it, an error occurred:

RuntimeError
mat1 dim 1 must match mat2 dim 0
File "/workspace/lianghaochen/SUSHI-main/src/models/mpntrack.py", line 32, in forward return self.fc_layers(input) File "/workspace/lianghaochen/SUSHI-main/src/models/mpntrack.py", line 153, in forward out_node_feats = self.node_mlp(nodes_feats) File "/workspace/lianghaochen/SUSHI-main/src/models/mpntrack.py", line 368, in forward latent_edge_feats, latent_node_feats = self.encoder(edge_attr, x) File "/workspace/lianghaochen/SUSHI-main/src/models/hiclnet.py", line 59, in forward return self.layers[ix_layer](data, node_level_embed=node_level_embed, edge_level_embed=edge_level_embed) File "/workspace/lianghaochen/SUSHI-main/src/tracker/hicl_tracker.py", line 354, in hicl_forward outputs = self.model(curr_batch, curr_depth) # Forward pass for this specific depth File "/workspace/lianghaochen/SUSHI-main/src/tracker/hicl_tracker.py", line 271, in _train_epoch _, loss, logs = self.hicl_forward(hicl_graphs = hicl_graphs, File "/workspace/lianghaochen/SUSHI-main/src/tracker/hicl_tracker.py", line 479, in train epoch_train_logs = self._train_epoch() File "/workspace/lianghaochen/SUSHI-main/scripts/main.py", line 39, in hicl_tracker.train() RuntimeError: mat1 dim 1 must match mat2 dim 0

So, I modified node_in_dim in SUSHI-main/configs/mpntrack_cfg.yaml from 2048 to 256, but the error remains unchanged.
thank you

@lianghaochen1
Copy link
Author

When I changed "--node_dim" and "node_in_dim" back to the original 2048, the model ran normally.

@lianghaochen1
Copy link
Author

I adjusted the FASTREID section, changing the dimension of the output feature vectors to 256, and retrained the REID network. This allowed the model to run smoothly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants