============================================================ Training CORN Disease Classification Model ============================================================ Loading dataset... Loaded 1659 images for corn Diseases: ['Blight', 'Common Rust', 'Gray Leaf Spot', 'Healthy'] Class distribution: {'Healthy': 1141, 'Blight': 276, 'Gray Leaf Spot': 128, 'Common Rust': 114} Creating data generators... Building model... Downloading data from https://storage.googleapis.com/keras-applications/efficientnetb0_notop.h5 Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/urllib/request.py", line 1319, in do_open h.request(req.get_method(), req.selector, req.data, headers, ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ encode_chunked=req.has_header('Transfer-encoding')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/http/client.py", line 1338, in request self._send_request(method, url, body, headers, encode_chunked) ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/http/client.py", line 1384, in _send_request self.endheaders(body, encode_chunked=encode_chunked) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/http/client.py", line 1333, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/http/client.py", line 1093, in _send_output self.send(msg) ~~~~~~~~~^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/http/client.py", line 1037, in send self.connect() ~~~~~~~~~~~~^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/http/client.py", line 1479, in connect self.sock = self._context.wrap_socket(self.sock, ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ server_hostname=server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ sock=sock, ^^^^^^^^^^ ...<5 lines>... session=session ^^^^^^^^^^^^^^^ ) ^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/ssl.py", line 1076, in _create self.do_handshake() ~~~~~~~~~~~~~~~~~^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/ssl.py", line 1372, in do_handshake self._sslobj.do_handshake() ~~~~~~~~~~~~~~~~~~~~~~~~~^^ ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1032) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/keras/src/utils/file_utils.py", line 354, in get_file urlretrieve(origin, download_target, DLProgbar()) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/urllib/request.py", line 214, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: ~~~~~~~^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/urllib/request.py", line 189, in urlopen return opener.open(url, data, timeout) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/urllib/request.py", line 489, in open response = self._open(req, data) File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/urllib/request.py", line 506, in _open result = self._call_chain(self.handle_open, protocol, protocol + '_open', req) File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/urllib/request.py", line 466, in _call_chain result = func(*args) File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/urllib/request.py", line 1367, in https_open return self.do_open(http.client.HTTPSConnection, req, ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ context=self._context) ^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/urllib/request.py", line 1322, in do_open raise URLError(err) urllib.error.URLError: During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/havishkunchanapalli/cropintel/ml/training/train_crop.py", line 174, in train_crop_model( ~~~~~~~~~~~~~~~~^ crop=args.crop, ^^^^^^^^^^^^^^^ epochs=args.epochs, ^^^^^^^^^^^^^^^^^^^ fine_tune=not args.no_fine_tune ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/Users/havishkunchanapalli/cropintel/ml/training/train_crop.py", line 56, in train_crop_model model = build_model(num_classes=len(class_names), crop=crop) File "/Users/havishkunchanapalli/cropintel/ml/utils/model_builder.py", line 29, in build_model base_model = getattr(applications, config["base_model"])( include_top=config["include_top"], weights=config["weights"], input_shape=config["input_shape"] ) File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/keras/src/applications/efficientnet.py", line 571, in EfficientNetB0 return EfficientNet( 1.0, ...<11 lines>... weights_name="b0", ) File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/keras/src/applications/efficientnet.py", line 428, in EfficientNet weights_path = file_utils.get_file( file_name, ...<2 lines>... file_hash=file_hash, ) File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/keras/src/utils/file_utils.py", line 358, in get_file raise Exception(error_msg.format(origin, e.errno, e.reason)) Exception: URL fetch failure on https://storage.googleapis.com/keras-applications/efficientnetb0_notop.h5: None -- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1032)