Open zanezfx opened 4 years ago
Have you taken a look at the source code of the node that generate the semantic image ?
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"
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'
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
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!