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

Make learning work #4

Merged
merged 15 commits into from
Nov 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
devcontainer: Add correct tensorrt key
marcojob committed Nov 7, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 4b43799380123077291e577c6397b337c1d18182
3 changes: 1 addition & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -32,8 +32,7 @@ RUN echo 'export PATH=$PATH:/usr/local/cuda/bin' >> /home/asl/.bash_aliases && \
# TensorRT: Install from .deb file
COPY resources/nv-tensorrt-repo-ubuntu2004-cuda11.6-trt8.4.3.1-ga-20220813_1-1_amd64.deb /tmp/
RUN sudo dpkg -i /tmp/resources/nv-tensorrt-repo-ubuntu2004-cuda11.6-trt8.4.3.1-ga-20220813_1-1_amd64.deb || sudo apt-get install -f -y
# RUN sudo cp /var/nv-tensorrt-repo-ubuntu2004-cuda11.6-trt8.4.3.1-ga-20220813/*-keyring.gpg /usr/share/keyrings/ && sudo apt update && sudo apt install -y tensorrt
RUN sudo apt update && sudo apt install -y tensorrt
RUN sudo apt-key add /var/nv-tensorrt-repo-ubuntu2004-cuda11.6-trt8.4.3.1-ga-20220813/c1c4ee19.pub && sudo apt update && sudo apt install -y tensorrt

# OpenCV Build Stage
FROM base AS opencv_build
14 changes: 7 additions & 7 deletions src/usb_cam_node.cpp
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@ class UsbCamNode {

UsbCamNode() : m_node("~") {
// Setup the network that outputs derivates of the image captured
// networks.push_back(std::make_unique<Raft>("resources/raft.onnx", 240, 320));
networks.push_back(std::make_unique<Raft>("resources/raft.onnx", 240, 320));

// Advertise the main image topic
image_transport::ImageTransport it(m_node);
@@ -177,12 +177,12 @@ class UsbCamNode {
m_image_pub.publish(m_image, *ci);

// Run all the networks
// for (const auto& net : networks) {
// net->set_input(m_image.data.data(), 1920, 1200);
// if (net->run_inference(1)) {
// net->publish();
// }
// }
for (const auto& net : networks) {
net->set_input(m_image.data.data(), 1920, 1200);
if (net->run_inference(1)) {
net->publish();
}
}

return true;
}