@WaterKnight
Such error is related to pickling. Usually pickling error happens when it feels confused on the class that you are trying to dump. (e.g. you import a class, make a change on it, and then dump an instance of the class/ your class has a conflicting name).
My best guess is that the error comes from name conflict of your data class MaskRCNN.
I see you import Mask RCNN module from torchvision (i.e. from torchvision.models.detection.mask_rcnn import *). In this module, there is also another class called MaskRCNN (see the source code), which in name conflict with your data class MaskRCNN.
Try changing the class name to something else and see if the error goes away
Ahhh, okey. Could you link me the default function , please? So I can look at his code and override it.
I don’t know which functions should I redefine. Don’t know which line of code is calling metrics computation.
In that case all fastai metrics would work.
EDIT @sgugger I am editing this post with a better explanation.
Learner class can receive as parameter an array of metrics. Somewhere in FastAI lib should be a function that pass the data to each metric (self.yb and self.preds). I have been looking for this code inside learner.py and in callbacks.
However, I didn’t manage to find it. Could you post here the function or a link that points there, please?
Hey,I am training MaskRCNN right now for binary segmentation. It is fully working with variable batch size. The only thing not working is Mixed Precission It is owed to an error on PyTorch
I’ll be sharing the repo in a month! This is my final degree project.
cool – so the code snippet you pasted above actually works ? Like if we just change the name of the data class MaskRCNN, as mentioned in the comments – it will actually work – or are there other changes.
Thanks for your inputs