Skip to content

andy8744/MATLAB_RockPaperScissors

Repository files navigation

MATLAB_RockPaperScissors

MATLAB Deep Learning Session Files
Link to matlab drive: https://drive.matlab.com/sharing/e3f8c4c7-6a26-4f2b-9a2b-1193de247686/

image

Beginner's MATLAB Intro to Deep Learning Session.

Make sure you have a MATLAB Login! Use your University Email to activate!!!

Instructions:

1. First open the files in MATLAB Online (or local if you have it installed)

image

2. Select "Copy Folder"

image

3. [WEBCAM] Open collect_images_via_webcam.m and run

image

[NO WEBCAM] Take pictures of ROCK, PAPER, SCISSORS, NULL class with your mobile phone. Upload images to ./data/CLASS

4. Collect 20-30 Images of each class. Move your hands in different areas.

rock_2023-11-13_16-04-35_534

5. Open transfer_learning.mlx

image

6. Seleect "APPS", then "Deep Network Designer" in the dropdown menu

image

7. Select googlenet in the Deep Network Designer

image

8. Delete loss-3-classifier layer

image

9. Replace with fullyConnectedLayer

image

10. Change Output Class to 4

image

11. Unlock output layer and select export

image

12. lgraph_1 should be visible in the bottom right. Select Run in live editor

image

13. Training will start.

image The accuracy should increase whilst loss decreases. Close when training has been complete.

14. Test network!

We can test the image on images taken on any device! Try an image taken with a webcam/phone, upload to PC and run the following:

inferImage(netTransfer, 'PATH_TO_YOUR_IMAGE')

15. Run on Webcam

image
In the MATLAB Command Window, run the following:
run_network_on_webcam(netTransfer, 0.4)

image Now we should get this.

About

MATLAB Deep Learning Session Files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages