0

I've followed this guide to the dot: https://github.com/matterport/Mask_RCNN/tree/3deaec5d902d16e1daf56b62d5971d428dc920bc

After the installation portion of the previous guide I went straight to trying to test an example. This is the sample: https://github.com/matterport/Mask_RCNN/tree/master/samples/balloon

I went straight to the training section in the README file. The first instruction in training the model is as follows

python3 balloon.py train --dataset=/path/to/balloon/dataset --weights=coco

I get the following response to entering this command:

image of error

I'm not sure what I've done wrong. All the dependencies are installed and are the versions listed in the installation guide in the first link.

  • It looks like that was written targeting Python 3.6 or greater. The invalid syntax you are seeing is a [variable annotation](https://peps.python.org/pep-0526/) which was introduced in Python 3.6. In the future, please post any errors you get as formatted text rather than an image. – Axe319 Mar 08 '23 at 20:13

1 Answers1

0

As 'Axe319' commented, to fix the error I just needed to change the python version to Python 3.6 or greater

I did the following and I was able to run the training command without the same issue:

 conda install python=3.6.0
  • As long as you are updating your Python version, you should update it to something much newer. (Python 3.6 reached end-of-life at the end of 2021. Even Python 3.7 is only getting security updates for another 3 months or so. Python 3.11 was released over 4 months ago. See https://devguide.python.org/versions/#versions for more details.) – chepner Mar 08 '23 at 23:30