activeintelligentsystemslab / pytorch_enet_ros Goto Github PK
View Code? Open in Web Editor NEWROS wrapper for the inference using libtorch and PyTorch models
ROS wrapper for the inference using libtorch and PyTorch models
Hi, thanks for your job. I am trying to compile your codes, however I could not find the semantic_segmentation_srvs package, cloud you please send me the package? Thank you!
Hi again,
I tried https://colab.research.google.com/github/iArunava/ENet-Real-Time-Semantic-Segmentation/blob/master/ENet-Real_Time_Semantic_Segmentation.ipynb#scrollTo=UhGVcnMbgr7y and obtained .pt model. The ros node was not able to load the model:
started roslaunch server http://172.19.0.3:35871/
SUMMARY
PARAMETERS
* /pytorch_seg_trav_path_node/colormap: /root/catkin_ws/s...
* /pytorch_seg_trav_path_node/model_file: /root/catkin_ws/s...
* /pytorch_seg_trav_path_node/model_name: greenhouse
* /rosdistro: melodic
* /rosversion: 1.14.12
NODES
/
pytorch_seg_trav_path_node (pytorch_ros/pytorch_seg_trav_path_node)
visualizer (pytorch_ros/visualizer.py)
ROS_MASTER_URI=http://localhost:11311
process[pytorch_seg_trav_path_node-1]: started with pid [1362]
process[visualizer-2]: started with pid [1363]
version_ <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at /opt/pytorch/pytorch/caffe2/serialize/inline_container.cc:132, please report a bug to PyTorch. Attempted to read a PyTorch file with v
ersion 3, but the maximum supported version for reading is 2. Your PyTorch installation may be too old. (init at /opt/pytorch/pytorch/caffe2/serialize/inline_container.cc:132)
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0x6c (0x7ff4d497b36c in /opt/pytorch/pytorch/torch/lib/libc10.so
)
frame #1: caffe2::serialize::PyTorchStreamReader::init() + 0x27b4 (0x7ff4d0e39d54 in /opt/pytorch/pytorch/torch/lib/libtorch_cpu.so)
frame #2: caffe2::serialize::PyTorchStreamReader::PyTorchStreamReader(std::unique_ptr<caffe2::serialize::ReadAdapterInterface, std::default_delete<caffe2::serialize::ReadAdapterInterface> >) + 0x6d (0x7f
f4d0e3b6ad in /opt/pytorch/pytorch/torch/lib/libtorch_cpu.so)
frame #3: <unknown function> + 0x2c3dedf (0x7ff4d1e3fedf in /opt/pytorch/pytorch/torch/lib/libtorch_cpu.so)
frame #4: torch::jit::load(std::unique_ptr<caffe2::serialize::ReadAdapterInterface, std::default_delete<caffe2::serialize::ReadAdapterInterface> >, c10::optional<c10::Device>, std::unordered_map<std::__c
xx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::c
har_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std:
:char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&) + 0x6d (0x7ff4d1e3f83d in /opt/pytorch/pytorch/torch/lib/libtorch
_cpu.so)
frame #5: torch::jit::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, c10::optional<c10::Device>, std::unordered_map<std::__cxx11::basic_string<char, std::cha
r_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<
char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocato
r<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&) + 0x79 (0x7ff4d1e3fdc9 in /opt/pytorch/pytorch/torch/lib/libtorch_cpu.so)
frame #6: PyTorchCppWrapperBase::import_module(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0x50 (0x7ff4d4c64688 in /root/catkin_ws/devel/lib/libpytorch_ros.s
o)
frame #7: PyTorchSegTravPathROS::PyTorchSegTravPathROS(ros::NodeHandle&) + 0x923 (0x7ff4d4c2e64f in /root/catkin_ws/devel/lib/libpytorch_ros.so)
frame #8: main + 0x16b (0x55ee5261dbcb in /root/catkin_ws/devel/lib/pytorch_ros/pytorch_seg_trav_path_node)
frame #9: __libc_start_main + 0xe7 (0x7ff47b48fb97 in /lib/x86_64-linux-gnu/libc.so.6)
frame #10: _start + 0x2a (0x55ee5261d8da in /root/catkin_ws/devel/lib/pytorch_ros/pytorch_seg_trav_path_node)
[ERROR] [1633032264.803756219]: Failed to import the model file [/root/catkin_ws/src/pytorch_enet_ros/models/model.pt]
[INFO] [1633032265.115712]: visualizer is initialized
[pytorch_seg_trav_path_node-1] process has finished cleanly
Hi,
Thanks for these great stuff. Is this package compatible with different models as well? (of course after doing the .pth to .pt conversions)
As a follow-up question, could you specify where in the code has to be changed so that above can be achieved?
I met the problem that libtorch is conflict with ros when I compile my code, Have you encountered the same problem?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.