david8862 / keras-YOLOv3-model-set

end-to-end YOLOv4/v3/v2 object detection pipeline, implemented on tf.keras with different technologies
MIT License
640 stars 222 forks source link

Error in executing in Google Colabs #244

Open dlin95123 opened 1 year ago

dlin95123 commented 1 year ago

While in the "pip install -r requirements.txt" step, it ran into the following error code:

Collecting scikit-learn==0.20.3 Downloading scikit-learn-0.20.3.tar.gz (11.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.8/11.8 MB 77.7 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done ERROR: Could not find a version that satisfies the requirement opencv-python==4.2.0.32 (from versions: 3.4.0.14, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66, 4.7.0.68, 4.7.0.72) ERROR: No matching distribution found for opencv-python==4.2.0.32

It generated the .h5 model file okay. But when it tried to convert .h5 to .pb file, it had the following error messages:

2023-05-07 03:30:17.493609: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-05-07 03:30:18.517361: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT Traceback (most recent call last): File "/content/keras-YOLOv3-model-set/tools/model_converter/keras_to_tensorflow.py", line 23, in from common.utils import get_custom_objects File "/content/keras-YOLOv3-model-set/tools/model_converter/../../common/utils.py", line 13, in from common.backbones.efficientnet import swish File "/content/keras-YOLOv3-model-set/tools/model_converter/../../common/backbones/efficientnet.py", line 23, in import keras_applications.imagenet_utils as keras_utils ModuleNotFoundError: No module named 'keras_applications'

Please advise how to address these error messages.