Closed oliverban closed 7 months ago
hi,
I got the same error. How can we use this custom node along with InstanceDiffusion?
Error occurred when executing YOLOTrackerNode:
'Results' object has no attribute 'obb'. See valid attributes below.
A class for storing and manipulating inference results.
Args: orig_img (numpy.ndarray): The original image as a numpy array. path (str): The path to the image file. names (dict): A dictionary of class names. boxes (torch.tensor, optional): A 2D tensor of bounding box coordinates for each detection. masks (torch.tensor, optional): A 3D tensor of detection masks, where each mask is a binary image. probs (torch.tensor, optional): A 1D tensor of probabilities of each class for classification task. keypoints (List[List[float]], optional): A list of detected keypoints for each object.
Attributes: orig_img (numpy.ndarray): The original image as a numpy array. orig_shape (tuple): The original image shape in (height, width) format. boxes (Boxes, optional): A Boxes object containing the detection bounding boxes. masks (Masks, optional): A Masks object containing the detection masks. probs (Probs, optional): A Probs object containing probabilities of each class for classification task. keypoints (Keypoints, optional): A Keypoints object containing detected keypoints for each object. speed (dict): A dictionary of preprocess, inference, and postprocess speeds in milliseconds per image. names (dict): A dictionary of class names. path (str): The path to the image file. _keys (tuple): A tuple of attribute names for non-empty attributes.
File "C:\ComfyUI\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "C:\ComfyUI\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "C:\ComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-TrackingNodes\nodes\yolo_tracker_node.py", line 56, in track detections = sv.Detections.from_ultralytics(results) File "C:\ComfyUI\python_embeded\lib\site-packages\supervision\detection\core.py", line 181, in from_ultralytics if ultralytics_results.obb is not None: File "C:\ComfyUI\python_embeded\lib\site-packages\ultralytics\utils__init.py", line 153, in getattr raise AttributeError(f"'{name}' object has no attribute '{attr}'. See valid attributes below.\n{self.doc__}")
Hi all, thanks for reporting this error.
I never tagged the versions of ultralytics and supervision so it's possible the packages now work differently. I'll take a look soon and commit a fix.
Thanks!
Update ultralytics
Hello,
I've recently tested this with the most recent versions of ultralytics, yolov8, supervision, ComfyUI, InstanceDiffusion, and AnimateDiff. Please update your pip packages and nodes for this to work.
Thanks!
Get an Error when feeding in an image sequence in Comfy to this node.
Error occurred when executing YOLOTrackerNode:
'Results' object has no attribute 'obb'. See valid attributes below.
A class for storing and manipulating inference results.
Args: orig_img (numpy.ndarray): The original image as a numpy array. path (str): The path to the image file. names (dict): A dictionary of class names. boxes (torch.tensor, optional): A 2D tensor of bounding box coordinates for each detection. masks (torch.tensor, optional): A 3D tensor of detection masks, where each mask is a binary image. probs (torch.tensor, optional): A 1D tensor of probabilities of each class for classification task. keypoints (List[List[float]], optional): A list of detected keypoints for each object.
Attributes: orig_img (numpy.ndarray): The original image as a numpy array. orig_shape (tuple): The original image shape in (height, width) format. boxes (Boxes, optional): A Boxes object containing the detection bounding boxes. masks (Masks, optional): A Masks object containing the detection masks. probs (Probs, optional): A Probs object containing probabilities of each class for classification task. keypoints (Keypoints, optional): A Keypoints object containing detected keypoints for each object. speed (dict): A dictionary of preprocess, inference, and postprocess speeds in milliseconds per image. names (dict): A dictionary of class names. path (str): The path to the image file. _keys (tuple): A tuple of attribute names for non-empty attributes.
File "C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-TrackingNodes\nodes\yolo_tracker_node.py", line 56, in track detections = sv.Detections.from_ultralytics(results) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\python_embeded\Lib\site-packages\supervision\detection\core.py", line 181, in from_ultralytics if ultralytics_results.obb is not None: ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\python_embeded\Lib\site-packages\ultralytics\utils__init.py", line 153, in getattr raise AttributeError(f"'{name}' object has no attribute '{attr}'. See valid attributes below.\n{self.doc__}")
Also, what does the TRACKING output connection of YOLOTrackerNode connect out to? It's not a SEGS and not a MASK?