File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -448,7 +448,7 @@ def not_agnostic_nms(
448448 return all_keeps
449449
450450 def __str__ (self ):
451- # List of useful attributes (non-empty ones)
451+ # Print the list of useful attributes (non-empty ones)
452452 useful_attributes = []
453453 if self .filtered_confidences :
454454 useful_attributes .append ("filtered_confidences" )
@@ -465,7 +465,7 @@ def __str__(self):
465465
466466 # If all attributes are empty
467467 if not useful_attributes :
468- return "Useful attributes: nothing detected in the frame. "
468+ return "Useful attributes: nothing detected in the frame"
469469
470470 # Build the output string
471471 output = "Useful attributes: " + ", " .join (useful_attributes ) + "\n \n "
Original file line number Diff line number Diff line change @@ -296,3 +296,10 @@ def _calculate_batch_inference(
296296 else :
297297 # Get the masks
298298 crop .detected_masks = pred .masks .data .cpu ().numpy ()
299+
300+ def __str__ (self ):
301+ # Print info about patches amount
302+ return (
303+ f"{ len (self .crops )} patches of size { self .crops [0 ].crop .shape } "
304+ f"were created from an image sized { self .image .shape } "
305+ )
You can’t perform that action at this time.
0 commit comments