https://github.com/matlab-deep-learning/deep_learning_poker_player_using_matlab_and_raspberry_pi
This example shows how to use automatic code generation to deploy a deep learning model from MATLAB to Raspberry Pi
https://github.com/matlab-deep-learning/deep_learning_poker_player_using_matlab_and_raspberry_pi
code-generation deep-learning deployment example matlab matlab-deep-learning neural-networks raspberry-pi
Last synced: 4 months ago
JSON representation
This example shows how to use automatic code generation to deploy a deep learning model from MATLAB to Raspberry Pi
- Host: GitHub
- URL: https://github.com/matlab-deep-learning/deep_learning_poker_player_using_matlab_and_raspberry_pi
- Owner: matlab-deep-learning
- License: other
- Created: 2020-05-14T04:42:34.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-14T04:42:46.000Z (over 5 years ago)
- Last Synced: 2025-05-07T19:47:40.386Z (6 months ago)
- Topics: code-generation, deep-learning, deployment, example, matlab, matlab-deep-learning, neural-networks, raspberry-pi
- Language: MATLAB
- Homepage: https://www.mathworks.com/videos/how-to-build-your-own-poker-player-using-matlab-deep-learning-and-raspberry-pi-1578482540720.html
- Size: 323 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Security: SECURITY.md
Awesome Lists containing this project
README
[](https://www.mathworks.com/matlabcentral/fileexchange/75018-deep_learning_poker_player_using_matlab_and_raspberry_pi)
# Deep_Learning_Poker_Player_using_MATLAB_and_Raspberry_Pi
This package includes MATLAB scripts that help you design a poker player using MATLAB, Deep Learning, and Raspberry Pi.
The poker-playing algorithm consists of a deep learning network that predicts the cards, and a custom MATLAB algorithm that
identifies ranked hands from the predictions and then makes bets like an actual player would. The algorithm can finally be
deployed to a Raspberry Pi hardware.
# Prerequisite
Configure the Raspberry Pi network, using the hardware-setup screen. During the this process, ensure that you download the MathWorks Raspbian image for deep learning.
# Poker_Setup:
This folder contains all the required files to generate a new dataset and train the classifier.
To generate datasets for training, connect a webcam to your PC and run the script "generateCardData.m"
Once card datasets are ready, run "transferLearnedCardset.m" for transferlearning.
This will create "identifyCards.mat" where all DNN info are stored.
# Poker_MATLAB_App:
Source code for the MATLAB App version of the poker player
Copy "identifyCards.mat" generated from Poker_Setup to this directory.
Run the MATLAB App.
# Poker_Codegen:
Codegen capable MATLAB function that can be deployed to Raspberry Pi
Copy "identifyCards.mat" generated from Poker_Setup to this directory.
Deploy the MATLAB function "raspi_poker_player" to Raspberry using the following commands:
>> t = targetHardware('Raspberry Pi')
>> t.CoderConfig.TargetLang = 'C++'
>> dlcfg = coder.DeepLearningConfig('arm-compute')
>> dlcfg.ArmArchitecture = 'armv7'
>> t.CoderConfig.DeepLearningConfig = dlcfg
>> deploy(t,'raspi_poker_player')