Skip to content

Commit

Permalink
actually fix checks
Browse files Browse the repository at this point in the history
  • Loading branch information
NishanthJKumar committed Jul 25, 2023
1 parent 7a2410c commit 421179e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion predicators/spot_utils/perception_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def query_detic_sam(image_in: np.ndarray, classes: List[str],
# necessary in the future.
for obj_class in classes:
class_mask = (d['classes'] == obj_class)
if np.all(class_mask is False):
if np.all(class_mask == False): # pylint:disable=singleton-comparison
continue
max_score = np.max(d['scores'][class_mask])
max_score_idx = np.where(d['scores'] == max_score)[0]
Expand Down
5 changes: 2 additions & 3 deletions predicators/spot_utils/spot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,8 @@ def get_objects_in_view_by_camera(
)
# Next, convert the keys of this dictionary to be april
# tag id's instead.
viewable_obj_poses: Dict[int,
Tuple[float, float,
float]] = {} # type: ignore
viewable_obj_poses: Dict[int, # type: ignore
Tuple[float, float, float]] = {}
for k, v in sam_pose_results.items():
viewable_obj_poses[obj_name_to_apriltag_id[
vision_prompt_to_obj_name[k]]] = v
Expand Down

0 comments on commit 421179e

Please sign in to comment.