2 Commits

Author SHA1 Message Date
0b41f82896 Added colored bands and added more pens. 2026-03-12 20:48:09 -04:00
0a34130ebe Merge CNN_0002 2026-03-11 20:31:14 -04:00
2 changed files with 13 additions and 2 deletions

View File

@@ -11,13 +11,24 @@ import matplotlib.pyplot as plt
# This model was trained with 13,185 images
# See CNNImageProcessor solution for creating the test images for training this model
# **************************************** I M P O R T A N T ********************************************************
# There is a shell script in the Scripts folder. setup_tf_gpu.sh Copy the script to the CNN folder and run it. It will
# create the venv enviroment and install python 3.10 and tensorflow (gpu)
# to start the environment "source tf_gpu/bin/activate"
# then type "code ."
# Train the model on EUPORIE laptop using the GPU card with WSL2. (Windows Subsystem For Linux). I am running Ubuntu1 22.04.2
# To launch WSL open up a command prompt, run powershell and type "wsl".
# The folder structure will be /home/pi/CNN.
# You can access the folder structure through windows explorer. type "\\wsl$" in explorer and navigate to the folder.
# drop in the Data and Model and run the model
# There is a shell script in the Scripts folder. setup_tf_gpu.sh Copy teh script to the CNN folder and run it. It will
# create the venv enviroment and install python 3.10 and tensorflow (gpu)
#
# If you want to run the model_host.py from the WSL2 environment (recommended for backtesting speed) you first need to get the address that was assigned to the
# WSL environment. On the WSL inatance type "hostname -I". Next, from the host environment you need to forward port requests
# on port 5000 (Flask Listener Port) to the WSL environment. Here is how to do that. Predictions on the WSL environment
# run considerable faster than on the host because the WSL environment is able to utilize the GPU.
# {To Create a Port Forward} netsh interface portproxy add v4tov4 listenport=5000 listenaddress=0.0.0.0 connectport=5000 connectaddress=172.29.110.64
# {To List Port Forwards} netsh interface portproxy show all
# {To Remove the Port Forward} netsh interface portproxy delete v4tov4 listenport=5000 listenaddress=0.0.0.0
# hostname -I
# ********************************************************************************************************************
# Figure out if we are training in CPU or GPU