diff --git a/Models/model_sk_convnext_v1.py b/Models/model_sk_convnext_v1.py index 1e5e57b..1737e42 100644 --- a/Models/model_sk_convnext_v1.py +++ b/Models/model_sk_convnext_v1.py @@ -11,6 +11,8 @@ 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 @@ -18,8 +20,15 @@ import matplotlib.pyplot as plt # 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 diff --git a/Weights/convnext_20260228_90.h5.keras b/Weights/convnext_20260228_90.h5.keras index 90f136a..330463b 100644 Binary files a/Weights/convnext_20260228_90.h5.keras and b/Weights/convnext_20260228_90.h5.keras differ