Mask_RCNN
Mask_RCNN copied to clipboard
AttributeError: module 'mrcnn.model' has no attribute 'data_generator'
There is no attribute in model.py for data_generator in mrcnn for tensorflow 2.
Hi @Omar-Belghaouti , did you find any solution for 'AttributeError: module 'mrcnn.model' has no attribute 'data_generator'' ?
Hi @Omar-Belghaouti , did you find any solution for 'AttributeError: module 'mrcnn.model' has no attribute 'data_generator'' ?
@ZeynepRuveyda sadly no, I stopped using mrcnn with tensorflow 2, had to fallback to tensorflow 1
Thank you!
I adopted the following version first https://github.com/leekunhee/Mask_RCNN/tree/tensorflow2.0 and ran inspect_data.ipynb. But encountered the same problem. There is no data_generator function in model.py. So I just used the original version https://github.com/matterport/Mask_RCNN (it has such a function but it is for tensorflow 1.X and it cannot run train_shapes.ipynb successfully.) and it works!
I am having this issue too, and really don't want tot switch to tf1! Has anyone found a solution to this still using tf2?
I am having this issue too, and really don't want tot switch to tf1! Has anyone found a solution to this still using tf2?
I, like bfhaha, am using this version: https://github.com/leekunhee/Mask_RCNN/tree/tensorflow2.0
There is a DataGenerator instead of data_generator in model.py.
While it is true, that the updated versions of the https://github.com/matterport/Mask_RCNN Have the class DataGenerator it throws the following issue
As of now, I am still very new to the field and I am simply trying to recreate the balloon example. The aforementioned error occurred calling the inspect_balloon_data notebook.
Any explanation as to why DataGenerator is not recognized as an iterator?
@Weber-AILand, the new DataGenerator
object is indeed not an iterator, but you can easily fix this code by changing next(g)
to next(iter(g))
for both conditions of the if ... else statement. This solved the issue for me.