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

small fixes to allow build from fresh install #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ find_package(catkin REQUIRED COMPONENTS
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)

## Generate messages in the 'msg' folder
add_message_files(
FILES
)
## add_message_files(
## FILES
## )

## Generate services in the 'srv' folder
# add_service_files(
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ thop
requests
tqdm
pyyaml
numpy>=1.24.3
scipy
2 changes: 1 addition & 1 deletion src/detect_ros.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def process_img_msg(self, img_msg: Image):
classes = [int(c) for c in detections[:, 5].tolist()]
vis_img = draw_detections(np_img_orig, bboxes, classes,
self.class_labels)
vis_msg = self.bridge.cv2_to_imgmsg(vis_img)
vis_msg = self.bridge.cv2_to_imgmsg(vis_img,"bgr8")
self.visualization_publisher.publish(vis_msg)


Expand Down
5 changes: 4 additions & 1 deletion src/models/experimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import random
import torch
import torch.nn as nn
import os

from models.common import Conv, DWConv
from utils.google_utils import attempt_download
Expand Down Expand Up @@ -237,8 +238,10 @@ def forward(self, x):
def attempt_load(weights, map_location=None):
# Loads an ensemble of models weights=[a,b,c] or a single model weights=[a] or weights=a
model = Ensemble()
print(type(weights))
for w in weights if isinstance(weights, list) else [weights]:
attempt_download(w)
if not os.path.exists(w):
attempt_download(w)
ckpt = torch.load(w, map_location=map_location) # load
model.append(ckpt['ema' if ckpt.get('ema') else 'model'].float().fuse().eval()) # FP32 model

Expand Down