Machine Learning Tutorial on WPILIB DOCS

Got the model to run successfully on Amazon SageMaker and runs on raspberry pi fine. However i can’t run the testing notebook without a client error.

ClientError: An error occurred (ValidationException) when calling the CreateTrainingJob operation: Access denied for repository: wpi-test in registry ID: 249838237784. Please check if your ECR repository and image exist and role arn:aws:iam::383392692906:role/service-role/AmazonSageMaker-ExecutionRole-20200112T190710 has proper pull permissions for SageMaker: ecr:BatchCheckLayerAvailability, ecr:BatchGetImage, ecr:GetDownloadUrlForLayer

2 Likes

Hi, thanks for trying this technology! Let me check out that ECR image for you, and I’ll get back to you ASAP.

Please try again. I forgot to add the proper permissions to that ECR image.

Worked this time. The default video, was from 2019, but the cargo was recognized as powercells.

I’ll try to find a new video to use as default, just know you can upload your own video (and there are steps in the tutorial to do so).

I do. We are just starting to work on doing our own annotations, wanted to see how it all worked before we invest the time. It’s pretty awesome how easy it is though, since you put in all that work.

1 Like

Thanks so much! Means a lot. Make sure you get a Google Coral, it will boost your FPS on the RPI by 15fps at least (I am not sponsored by Google).

When I run training.ipynb in JupyterLab, the following error pops up:
ClientError: An error occurred (AccessDeniedException) when calling the CreateTrainingJob operation: User: arn:aws:sts::358022621798:assumed-role/AmazonSageMaker-ExecutionRole-20200117T171623/SageMaker is not authorized to perform: sagemaker:CreateTrainingJob on resource: arn:aws:sagemaker:us-east-1:358022621798:training-job/wpi-cpu-2020-01-17-23-06-25-633 with an explicit deny

Hmm. That’s a weird one. The first thing I would do is create a new notebook, using a NEW execution role. The role you are using is missing a permission, and the easiest way to fix it is to create a new execution role.

If that doesn’t work, please make sure you are using the AWS account provided through your team’s ML classroom.

We have tried using a new notebook and a new execution role. Several team members have even started over from the beginning with new accounts and we still get the same error message.

Are you absolutely certain that you are using the correct accounts? When on the AWS Educate home page, you should click “Classrooms”, then click on your classroom, the access the AWS console. You should NOT click “AWS account” in the aws educate page.

Please refer to steps 3 and on here: https://docs.wpilib.org/en/latest/docs/software/examples-tutorials/machine-learning/uploading-data-to-aws-s3.html

We did use the classroom to access the AWS console following the instructions on the docs.

Can you please go to AWS’s IAM manager in the AWS Console, and ensure that the execution role being used has the permission to create a training job? If not, try to add it.

I am unable to do anything on the IAM manager and neither can my mentor who created the classroom.

I think this is a AWS Educate issue. Please fill out this form with your issue https://support.aws.amazon.com/#/contacts/aws-educate

I’m sorry I can’t help more.

Thank you

Side note: this is definitely very cool for learning, but typically an OpenCV object detection approach will run much faster than a machine learning one for this year’s game pieces, which are easy to filter out.

Not going to disagree with this point entirely, but I’d love to see an OpenCV pipeline that is accurate as one of my team’s models. The best fps I’ve seen is ~30 though, which is not as high as what’s typical with OpenCV. It’s a trade off, but one I think some teams are willing to make.

If you try the newest version of testing.ipynb, there is a new default video with Power Cells, not Cargo and Hatches. Hope it helps.

Not sure if this is the right thread to ask in, let me know if there’s a better place for this sort of question.

Is there a way to download the training data to use offline?