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 change into my own PSPnet model? #29

Open
zanezfx opened this issue Oct 22, 2020 · 4 comments
Open

How to change into my own PSPnet model? #29

zanezfx opened this issue Oct 22, 2020 · 4 comments

Comments

@zanezfx
Copy link

zanezfx commented Oct 22, 2020

I created a dataset with some certain types of objects, and I trained a new PSPnet model on that dataset. How can I replace your model with mine? Thank you!

@codieboomboom
Copy link

Have you taken a look at the source code of the node that generate the semantic image ?

@ahmadkh1995
Copy link

If you already have your own model , you just need to modify this file;
semantic_slam/semantic_slam/params/semantic_cloud.yaml

and substitute this line;
model_path: "/home/interns/xuan/models/pspnet_50_ade20k.pth"

@frankSARU
Copy link

I'm trying to use my own model too and I have trained a PSPnet model with ADE20K dataset. But the console give me an error like this:
Traceback (most recent call last): File "/home/frank/ss_ws/src/semantic_slam/semantic_cloud/src/semantic_cloud.py", line 295, in <module> main(sys.argv) File "/home/frank/ss_ws/src/semantic_slam/semantic_cloud/src/semantic_cloud.py", line 288, in main seg_cnn = SemanticCloud(gen_pcl = True) File "/home/frank/ss_ws/src/semantic_slam/semantic_cloud/src/semantic_cloud.py", line 124, in __init__ self.model.load_state_dict(convert_state_dict(state['model_state'])) # Remove 'module' from dictionary keys KeyError: 'model_state'

@jolags313
Copy link

I'm trying to use my own model too and I have trained a PSPnet model with ADE20K dataset. But the console give me an error like this: Traceback (most recent call last): File "/home/frank/ss_ws/src/semantic_slam/semantic_cloud/src/semantic_cloud.py", line 295, in <module> main(sys.argv) File "/home/frank/ss_ws/src/semantic_slam/semantic_cloud/src/semantic_cloud.py", line 288, in main seg_cnn = SemanticCloud(gen_pcl = True) File "/home/frank/ss_ws/src/semantic_slam/semantic_cloud/src/semantic_cloud.py", line 124, in __init__ self.model.load_state_dict(convert_state_dict(state['model_state'])) # Remove 'module' from dictionary keys KeyError: 'model_state'

Were you able to solve this issue? I'm seeing the same thing

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

5 participants