I am following this tutorial YOLOv4 Object Detection with TensorFlow
while running this script
# Convert darknet weights to tensorflow
## yolov4
python save_model.py --weights ./data/yolov4.weights --output ./checkpoints/yolov4-416 --input_size 416 --model yolov4
I am getting this error
C:\tensorflow-yolov4-tflite-master>python save_model.py --weights ./data/yolov4-obj_3000.weights --output ./checkpoints/yolov4-416 --input_size 416 --model yolov4
Traceback (most recent call last):
File "save_model.py", line 1, in <module>
import tensorflow as tf
File "C:\Users\hp\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\hp\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\__init__.py", line 40, in <module>
from tensorflow.python.eager import context
File "C:\Users\hp\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\eager\context.py", line 35, in <module>
from tensorflow.python import pywrap_tfe
File "C:\Users\hp\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tfe.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\hp\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in <module>
self_check.preload_check()
File "C:\Users\hp\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\platform\self_check.py", line 61, in preload_check
% " or ".join(missing))
ImportError: Could not find the DLL(s) 'msvcp140.dll or msvcp140_1.dll'. TensorFlow requires that these DLLs be installed in a
directory that is named in your %PATH% environment variable. You may install these DLLs by downloading "Microsoft C++
Redistributable for Visual Studio 2015, 2017 and 2019" for your platform from
this URL: https://support.microsoft.com/help/2977003/the-latest-supported-visual-c-downloads
I have tried solving it by manually downloading these files and placing them in
C:\Users\hp\AppData\Local\Programs\Python\Python37
and re-installing microsoft c++ 2015 redistributable x64
as mentioned in
Tensorflow - ImportError: Could not find 'msvcp140.dll' but to no avail.
my TensorFlow installation is Cpu based
C:\>pip show tensorflow
Name: tensorflow
Version: 2.3.0rc0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
Requires: termcolor, scipy, keras-preprocessing, grpcio, absl-py, six, opt-einsum, numpy, google-pasta, protobuf, wheel, h5py, gast, tf-estimator-nightly, wrapt, tensorboard, astunparse
Required-by: