InteractiveScribblesRobot(self, kernel_size=0.15, max_kernel_radius=16, min_nb_nodes=4, nb_points=1000)
Robot that generates realistic scribbles simulating human interaction.


  • kernel_size: Float. Fraction of the square root of the area used to compute the dilation and erosion before computing the skeleton of the error masks.
  • max_kernel_radius: Float. Maximum kernel radius when applying dilation and erosion. Default 16 pixels.
  • min_nb_nodes: Integer. Number of nodes necessary to keep a connected graph and convert it into a scribble.
  • nb_points: Integer. Number of points to sample the bezier curve when converting the final paths into curves.


InteractiveScribblesRobot.interact(self, sequence, pred_masks, gt_masks, nb_objects=None, frame=None)
Interaction of the Scribble robot given a prediction. Given the sequence and a mask prediction, the robot will return a scribble in the region that fails the most.


  • sequence: String. Name of the sequence to interact with.
  • pred_masks: Numpy Array. Array with the prediction masks. It must be an integer array with shape (B x H x W), with B being the number of frames of the sequence.
  • gt_masks: Numpy Array. Array with the ground truth of the sequence. It must have the same data type and shape as pred_masks.
  • nb_objects: Integer. Number of objects in the ground truth mask. If None the value will be infered from y_true. Setting this value will speed up the computation.
  • frame: Integer. Frame to generate the scribble. If not given, the worst frame given by the jaccard will be used.


dict: Return a scribble (default representation).