class_docstr: Streaming interface to allow for any source of predictions. 
  Initialize it, count predictions one by one, then print confusion matrix and intersection-union score
class_docstr_tok: ["Streaming","interface","to","allow","for","any","source","of","predictions",".","Initialize","it",",","count","predictions","one","by","one",",","then","print","confusion","matrix","and","intersection-union","score"]
code: def create_from_matrix(confusion_matrix):
      assert confusion_matrix.shape[0] == confusion_matrix.shape[1]
      matrix = ConfusionMatrix(confusion_matrix.shape[0])
      matrix.confusion_matrix = confusion_matrix
      return matrix
  
file_path: torch-points3d/torch_points3d/metrics/confusion_matrix.py
imports: import numpy
  import torch
  import os
label_desc: Use image node_id 2 for calling the ConfusionMatrix obj's underlying member method code with example usage: obj.create_from_matrix(confusion_matrix) and returns: matrix