kentaroy47 / frcnn-from-scratch-with-keras

:collision:Faster R-CNN from scratch written with Keras
Apache License 2.0
168 stars 106 forks source link

Problem with AttributeError: 'str' object has no attribute 'shape' #101

Open saylideshmukh opened 3 years ago

saylideshmukh commented 3 years ago

My text file is gt.txt where the rows are like this 00000.ppm;774;411;815;446;11

When I run this command train_rpn.py' --network resnet50 -o simple -p D:\project\rpntrainann\gt.txt

It creates the model but then I get this error: Traceback (most recent call last): File "train_rpn.py", line 243, in steps_per_epoch=10, validation_steps=100) AttributeError: 'str' object has no attribute 'shape'

I tried different solutions but I am unable to resolve

jackycote commented 3 years ago

Having the same issue, using TF 2.4.1 and Keras 2.4.3.

I did replace "K.image_dim_ordering" with "K.image_data_format"

issue is in "data_adapter.py", line 794, in _get_dynamic_shape"

printing "t" variable before it fails shows t = "aeroplane"

Any clue ?

P.S.: I understand TF and K do not match original version but I would like to see if I can run it with newer versions.

Thanks

chitthushine commented 3 years ago

I am facing the same issue. Please let me know is there any solutions?