Open jjeongmin0308 opened 1 year ago
I use these code to replace that one,and it worked. However the weight didn't work as I thought. There is no boundingbox in the ouput of image. I don't know how is going on. Hope to help you.
conv_weights = np.ones(np.product(conv_shape))
conv_weights = conv_weights.reshape(conv_shape)
conv_weights = np.transpose(conv_weights, (2, 3, 1, 0))
#conv_weights = conv_shape.reshape(conv_shape).transpose([2, 3, 1, 0])
change core/config.py
line 14: __C.YOLO.CLASSES =
to path of your custom obj.names
!python save_model.py --weights /content/tensorflow-yolov4-tflite/data/yolov4-custom_last.weights --output ./checkpoints/custom-416 --input_size 416 --model yolov4 --framework tflite
2022-09-17 18:04:49.809104: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1 2022-09-17 18:04:51.493961: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcuda.so.1 2022-09-17 18:04:51.503223: E tensorflow/stream_executor/cuda/cuda_driver.cc:314] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected 2022-09-17 18:04:51.503344: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (79cfa2660112): /proc/driver/nvidia/version does not exist 2022-09-17 18:04:51.504271: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2022-09-17 18:04:51.512390: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2199995000 Hz 2022-09-17 18:04:51.512654: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x20e8f40 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2022-09-17 18:04:51.512699: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version Traceback (most recent call last): File "save_model.py", line 58, inI made the following efforts to correct this error.
https://github.com/hunglc007/tensorflow-yolov4-tflite/issues/396#issuecomment-927229582
https://github.com/hunglc007/tensorflow-yolov4-tflite/issues/396#issuecomment-927316932
However, the error has not been corrected.
I also checked that there is no empty line at the bottom of the file.