diff --git a/Code/Ball_Detection/PyTorch_with_ESPCAM/live_full_detection_detecto_with_ESP_CAM.py b/Code/Ball_Detection/PyTorch_with_ESPCAM/live_full_detection_detecto_with_ESP_CAM.py
index 45d0f4b2294d296db2ec3e29f96ee79bcc7b8ca3..02162c2798d384488bd7d5e411b7b84db40ffa23 100644
--- a/Code/Ball_Detection/PyTorch_with_ESPCAM/live_full_detection_detecto_with_ESP_CAM.py
+++ b/Code/Ball_Detection/PyTorch_with_ESPCAM/live_full_detection_detecto_with_ESP_CAM.py
@@ -18,7 +18,7 @@ from matplotlib import patches
 from detecto import core, utils
 from torchvision import transforms
 from matplotlib import pyplot as plt
-from IPython.display import Image, display, Javascript
+# from IPython.display import Image, display, Javascript
 distanceDetect = __import__('distance-detection-torch.distance-detection-torch', fromlist = ['distanceDetect']).distanceDetect
 print("torch.cuda.is_available() = ", torch.cuda.is_available())
 
@@ -26,22 +26,20 @@ print("torch.cuda.is_available() = ", torch.cuda.is_available())
 #change the IP address below according to the
 #IP shown in the Serial monitor of Arduino code
 # url='http://192.168.1.107/cam-lo.jpg'
-url='http://192.168.4.1/cam-hi.jpg'
+# url='http://192.168.4.1/cam-hi.jpg'
 # url='http://192.168.1.107/cam-mid.jpg'
-
+url='http://192.168.0.230/cam-hi.jpg'
 
 #### Modify Detecto Core to include possibility of other base models
 def modifyCore():
-  cModLineNums = [221, 254]
+  cModLineNums = [221, 253, 254]
   cAddLineNums = [254, 256, 257, 258, 259]
 
   # REPLACABLE LINE FOR DIFFERENT LOCAL COMPUTER DEVICES
-  coreFile     = 'C:\\Users\\uclal\\.conda\\envs\\FORAY\\Lib\\site-packages\\detecto\\core.py'
-
-
-  print('debug')
+  coreFile     = 'C:\\Users\\uclal\\.conda\\envs\\foray2\\Lib\\site-packages\\detecto\\core.py'
 
   cModLineVals = ["    def __init__(self, classes=None, device=None, pretrained=True, modelname=\'fasterrcnn_resnet50_fpn\'):\n",
+                  "        # Load a model pre-trained on COCO - User-Modified",
                   "            self._model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=pretrained)\n"]
   cAddLineVals = ["        if modelname == \'fasterrcnn_resnet50_fpn\':\n",
                   "        elif modelname == \'fasterrcnn_mobilenet_v3_large_fpn\':\n",
@@ -146,7 +144,7 @@ def detectLive(model, showSight = True):
     #print(frame)
     gbx = -1
     gby = -1
-    
+
     header = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36."}
     req = Request(url, headers=header)
     img_resp = urlopen(req, timeout=60)
@@ -265,13 +263,13 @@ distWtsFile = '.\distance-detection-torch\distance-detection-weights-3-2.0sd-202
 modelAction = 'load' # 'load' to load previous model, 'new' to train new model (only possible on Colab)
 
 #FOR THE NEXT LINE : UNCOMMENT  the first time you run, COMMENT OUT after the first time
-#modifyCore()
+# modifyCore()
 #########
 
-# model = returnModel(modelAction, device, trainLoc, labelSet, modelLoc, modelFile)
-# # # ## Testing (using Live Streaming)
-# while True:
-#     detectLive(model)
+model = returnModel(modelAction, device, trainLoc, labelSet, modelLoc, modelFile)
+# # ## Testing (using Live Streaming)
+while True:
+    detectLive(model)
 
 # ## Testing (using Untrained Images)
 # for file in sorted(glob.glob(imageLoc + '/test/*.jpg')):
diff --git a/Code/Control/Laptop_Code/README.md b/Code/Control/Laptop_Code/README.md
index fbdeb708b80ea00c3bc27feea54f787ba6ad518a..845e17a57dd345dc824cfb7973920bf23e921e4b 100644
--- a/Code/Control/Laptop_Code/README.md
+++ b/Code/Control/Laptop_Code/README.md
@@ -70,8 +70,12 @@ pip install opencv-python
 conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
 # install pupil-apriltags
 pip install pupil-apriltags
+# install detecto
+pip install detecto==1.2.1
 ```
 
+
+
 ## 3 Main_code
 
 There are two files about main code: 
diff --git a/Code/Control/Laptop_Code/ball_detection/ball_detection.py b/Code/Control/Laptop_Code/ball_detection/ball_detection.py
index 7d5728d52d0b69f0d48f66d4ccdccfa0337ca21a..ef8c37779a0e51d5b9b39b9cef7f4de2125f8e98 100644
--- a/Code/Control/Laptop_Code/ball_detection/ball_detection.py
+++ b/Code/Control/Laptop_Code/ball_detection/ball_detection.py
@@ -18,7 +18,6 @@ from matplotlib import patches
 from detecto import core, utils
 from torchvision import transforms
 from matplotlib import pyplot as plt
-from IPython.display import Image, display, Javascript
 distanceDetect = __import__('ball_detection.distance-detection-torch.distance-detection-torch', fromlist = ['distanceDetect']).distanceDetect
 # print("torch.cuda.is_available() = ", torch.cuda.is_available())
 
@@ -27,6 +26,36 @@ distanceDetect = __import__('ball_detection.distance-detection-torch.distance-de
 url='http://192.168.4.1/cam-hi.jpg'
 # url='http://192.168.1.107/cam-mid.jpg'
 
+#### Modify Detecto Core to include possibility of other base models
+def modifyCore():
+  cModLineNums = [221, 253, 254]
+  cAddLineNums = [254, 256, 257, 258, 259]
+
+  # REPLACABLE LINE FOR DIFFERENT LOCAL COMPUTER DEVICES
+  coreFile     = 'C:\\Users\\uclal\\.conda\\envs\\foray2\\Lib\\site-packages\\detecto\\core.py'
+
+  cModLineVals = ["    def __init__(self, classes=None, device=None, pretrained=True, modelname=\'fasterrcnn_resnet50_fpn\'):\n",
+                  "        # Load a model pre-trained on COCO - User-Modified",
+                  "            self._model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=pretrained)\n"]
+  cAddLineVals = ["        if modelname == \'fasterrcnn_resnet50_fpn\':\n",
+                  "        elif modelname == \'fasterrcnn_mobilenet_v3_large_fpn\':\n",
+                  "            self._model = torchvision.models.detection.fasterrcnn_mobilenet_v3_large_fpn(pretrained=pretrained)\n",
+                  "        elif modelname == \'fasterrcnn_mobilenet_v3_large_320_fpn\':\n",
+                  "            self._model = torchvision.models.detection.fasterrcnn_mobilenet_v3_large_320_fpn(pretrained=pretrained)\n",
+                  "        else:",
+                  "            return ValueError('Unknown Pretrained Model')"]
+  coreRead = open(coreFile, "r")
+  coreLines = coreRead.readlines()
+  if coreLines[253][-14:-1] != 'User-Modified':
+    for count, cModLineNum in enumerate(cModLineNums):
+      coreLines[cModLineNum] = cModLineVals[count]
+    for count, cAddLineNum in enumerate(cAddLineNums):
+      coreLines.insert(cAddLineNum, cAddLineVals[count])
+    coreRead.close()
+    coreWrite = open(coreFile, "w")
+    coreWrite.writelines(coreLines)
+    coreWrite.close()
+
 def modelName(type = 1):
   if type == 1:
     return 'fasterrcnn_resnet50_fpn'
diff --git a/Code/Control/Laptop_Code/ball_detection/ball_detection_full.py b/Code/Control/Laptop_Code/ball_detection/ball_detection_full.py
index 166653513289d7aaccb198e402261a1ec1abecb7..ee9dceaa208cff7dc279518acd52ca0286831657 100644
--- a/Code/Control/Laptop_Code/ball_detection/ball_detection_full.py
+++ b/Code/Control/Laptop_Code/ball_detection/ball_detection_full.py
@@ -18,7 +18,6 @@ from matplotlib import patches
 from detecto import core, utils
 from torchvision import transforms
 from matplotlib import pyplot as plt
-from IPython.display import Image, display, Javascript
 distanceDetect = __import__('ball_detection.distance-detection-torch.distance-detection-torch', fromlist = ['distanceDetect']).distanceDetect
 print("torch.cuda.is_available() = ", torch.cuda.is_available())
 
@@ -31,13 +30,14 @@ url='http://192.168.4.1/cam-hi.jpg'
 
 #### Modify Detecto Core to include possibility of other base models
 def modifyCore():
-  cModLineNums = [221, 254]
+  cModLineNums = [221, 253, 254]
   cAddLineNums = [254, 256, 257, 258, 259]
 
   # REPLACABLE LINE FOR DIFFERENT LOCAL COMPUTER DEVICES
-  coreFile     = 'C:\\Users\\uclal\\.conda\\envs\\FORAY\\Lib\\site-packages\\detecto\\core.py'
+  coreFile     = 'C:\\Users\\uclal\\.conda\\envs\\foray2\\Lib\\site-packages\\detecto\\core.py'
 
   cModLineVals = ["    def __init__(self, classes=None, device=None, pretrained=True, modelname=\'fasterrcnn_resnet50_fpn\'):\n",
+                  "        # Load a model pre-trained on COCO - User-Modified",
                   "            self._model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=pretrained)\n"]
   cAddLineVals = ["        if modelname == \'fasterrcnn_resnet50_fpn\':\n",
                   "        elif modelname == \'fasterrcnn_mobilenet_v3_large_fpn\':\n",
@@ -238,7 +238,7 @@ distWtsFile = './ball_detection/distance-detection-torch/distance-detection-weig
 modelAction = 'load' # 'load' to load previous model, 'new' to train new model (only possible on Colab)
 
 #FOR THE NEXT LINE : UNCOMMENT  the first time you run, COMMENT OUT after the first time
-#modifyCore()
+modifyCore()
 #########
 
 # model = returnModel(modelAction, device, trainLoc, labelSet, modelLoc, modelFile)
diff --git a/Code/Control/Laptop_Code/main_keyboard.py b/Code/Control/Laptop_Code/main_keyboard.py
index 553a0b29ecd1f987cbade2826e7a0d32534cb994..a1e41ee8406e57015c2eddafec8e69fe05434f27 100644
--- a/Code/Control/Laptop_Code/main_keyboard.py
+++ b/Code/Control/Laptop_Code/main_keyboard.py
@@ -8,7 +8,7 @@ from constants import *
 from ESP32_AT.imageTread_AT import get_AT_6DOF_info
 
 global ml,esp_cam_on,openmv_on
-ml = 0
+ml = 1
 esp_cam_on = 0
 openmv_on = 1
 if ml == 1:
@@ -629,6 +629,7 @@ if __name__ == '__main__':
 
     # Loading the PyTorch ML model for ball detection
     if ml == 1:
+        ball_detection.modifyCore()
         model = ball_detection.returnModel(device, labelSet, modelLoc, modelFile)
 
     # =========== DECLARE VARIABLES ===========