semantic_slam icon indicating copy to clipboard operation
semantic_slam copied to clipboard

How to change into my own PSPnet model?

Open zanezfx opened this issue 3 years ago • 4 comments

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!

zanezfx avatar Oct 22 '20 14:10 zanezfx

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

codieboomboom avatar Dec 31 '20 05:12 codieboomboom

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"

ahmadkh1995 avatar Mar 10 '21 13:03 ahmadkh1995

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'

frankSARU avatar Oct 29 '21 00:10 frankSARU

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

jolags313 avatar Mar 12 '24 21:03 jolags313