I'm trying to print
the Intersection of Union (IoU) value of images when running inspect_model.ipynb
from this github repo. The function is in another python file (model.py
). I've followed the steps in the answer from a similar question here but I'm getting the error message shown below.
Directory tree of the 2 files are :
/Mask_RCNN-master (working directory)
/ model.py
/ inspect_model.ipynb
Importing nbimporter
and the file(model.py
) containing the function
import nbimporter
import model
The code of the function that I want to call :
#to print IoU of image
class Accuracy():
def __init__(self):
print("IoU: ",iou)
The code I used to call the function in the notebook that I'm running :
new = model.Accuracy()
Error Message:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-58-383458c9727b> in <module>()
20 print("mAP @ IoU=50: ", np.mean(APs))
21
---> 22 new = model.Accuracy()
AttributeError: 'MaskRCNN' object has no attribute 'Accuracy'