AWS IoT Setup | AWS IoT Greengrass Setup | AWS Machine Learning Interface
AWS SDK Setup | AWS SDK Rekognition
GCP IoT Setup
GCP SDK Setup
Device: Camera Setup
0. Prerequisites
- Raspberry Pi 3 Model B+ or Model B
- Raspberry Pi Camera Module V2 - 8 Megapixel, 1080p
- A Greengrass group and a Greengrass core
- Doc
1. Install the dependencies for the Apache MXNet framework
# Temporarily increase the swap size for installing scipi
sudo vim /etc/dphys-swapfile
# Change CONF_SWAPSIZE = 1000
/etc/init.d/dphys-swapfile restart
# Activate environment
source activate pinenuts
# Save the file armv7l.sh
cd Iot_EdgeComputing/src/conda_env/conda_aws/aws_greegrass_image_connector
sudo bash armv71.sh
2. Install the Apache MXNet Framework
Download ggc-mxnet-v1.2.1-python-raspi.tar.gz
# Install the MXNet framework
scp ggc-mxnet-v1.2.1-python-raspi.tar.gz pi@192.168.178.29:/home/pi
# Install the MXNet framework
cd /home/pi
tar -xzf ggc-mxnet-v1.2.1-python-raspi.tar.gz
cd ggc-mxnet-v1.2.1-python-raspi
./mxnet_installer.sh
# Copy file to my project repo
scp greengrassObjectClassification.zip ~/Documents/Iot_EdgeComputing/src/conda_env/conda_aws/ml_interface
3. Create an MXNet Model Package
# 1) Download three files
mkdir ml_interface
cd ml_interface
curl -O https://s3.amazonaws.com/model-server/model_archive_1.0/examples/squeezenet_v1.1/squeezenet_v1.1-symbol.json
curl -O https://s3.amazonaws.com/model-server/model_archive_1.0/examples/squeezenet_v1.1/squeezenet_v1.1-0000.params
curl -O https://s3.amazonaws.com/model-server/model_archive_1.0/examples/squeezenet_v1.1/synset.txt
# 2) Zip files
sudo zip -r squeezenet.zip squeezenet_v1.1-symbol.json squeezenet_v1.1-0000.params synset.txt
4. Create and Publish a Lambda Function
5: Add the Lambda Function to the Greengrass Group
6. Add Resources to the Greengrass Group
- bucket: greengrass-bucket-pinenuts
- interface