Code:
from mantisshrimp.all import *
presize = 512
size = 384
train_tfms = tfms.A.Adapter([*tfms.A.aug_tfms(size=size, presize=presize), tfms.A.Normalize()])
valid_tfms = tfms.A.Adapter([*tfms.A.resize_and_pad(size=size), tfms.A.Normalize()])
Throws: AttributeError: module 'mantisshrimp.tfms' has no attribute 'A'.
It is based on the example from docs, is it changed somehow now?
That error means you don't have albumentations installed.
For fixing this immediate error you should do pip install albumentations, but consider installing mantis with [all] so problems like this don't happen =)
I've done as u recommended. It has fixed tfms error however two new problems occured
1) During first run in jupyter after executting from mantisshrimp.all import * I get ModuleNotFoundError: No module named 'mantisshrimp.models.rcnn.fastai' error. Surprisingly when I execute the cell once again the problem disappears (the cell runs normally)
2) There is also a problem with show_record method. It seems as though it ins't included in mantisshrimp.all since when I try to use it I get NameError: name 'show_record' is not defined, any ideas what might be causing that?
I think I might have broken something in the latest commit... I'll check it out and let you know :smile:
This should be fixed with #321.
It was a very stupid mistake I did in a commit from yesterday, I also updated the tests to pick errors like these from the future, hopefully, you didn't lose much time :sweat_smile:
For updating, you just need to do:
pip install git+git://github.com/airctic/mantisshrimp.git#egg=mantisshrimp[all] --upgrade
On a side note, we're already working on a Pypi release, that will give users more stability compared to working directly from the master branch, keep an eye on our community for updates :smile:
Yeah it fixed my issue, so I was able to finally train the model, thanks for fast help.
I found the new bug (error when resize_and_pad goes beyond the detection), however I think it needs a new issue.
I close this one.