- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hello All,
I was following the steps to convert yolov4 to IR as the following link, but I got error for;
from keras-yolo4.model import Mish
and after searching in the community I found another steps, so I followed it, but I got another error;
The main goal is convert from yolov4 to IR and try to change the input shape to 416x224 instead to 608x608.
for ex;
python3 mo.py --saved_model_dir yolov4 --output_dir models/IRs --input_shape [1,416,224,3] --model_name yolov4
BR,
Mostafa
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi Mostafa-,
Thanks for your patience.
From your first post, we noticed that your main goal is to convert from yolov4 to IR and try to change the input shape to 416x224 instead of 608x608.
We are sorry to tell you that the documentation you referred to is outdated. You may refer to the following steps (workaround) to convert yolov4 to IR:
cd /opt/intel/openvino_2021/deployment_tools/tools/model_downloader
sudo python3 downloader.py --name=yolo-v4-tf
Rename your weight file to yolov4.weights and replace to the following directory:
/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf
Rename your config file to yolov4.cfg and replace to the following directory:
/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf/keras-YOLOv3-model-set/cfg
cd /opt/intel/openvino_2021/deployment_tools/open_model_zoo/models/public/yolo-v4-tf
sudo python3 pre-convert.py "/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf" "/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf"
yolo-v4.savedmodel will be generated in the following directory:
/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf
cd /opt/intel/openvino_2021/deployment_tools/model_optimizer
sudo python3 mo.py --framework=tf --data_type=FP16 --output_dir=/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf/FP16 --model_name=yolo-v4-tf --input_shape=[1,416,224,3] --input=image_input --scale_values=image_input[255] --reverse_input_channels --saved_model_dir=/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf/yolo-v4.savedmodel
The Intermediate Representation will be generated in the following directory:
/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf/FP16
Regards,
Wan
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi Mostafa,
Thanks for reaching out.
I encountered the same error before and the problem can be fixed by running the following command:
pip install --upgrade tensorflow
pip install --upgrade tensorflow-gpu
Regards,
Aznie
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi Aznie,
I ran the above commands, and I got a different error;
PS: I am using WSL2 as testing environment.
Many Thanks,
Mostafa
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi Mostafa-,
Thank you for reaching out to us.
We are investigating this issue and will update you at the earliest.
Regards,
Wan
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi Mostafa-,
Thanks for your patience.
From your first post, we noticed that your main goal is to convert from yolov4 to IR and try to change the input shape to 416x224 instead of 608x608.
We are sorry to tell you that the documentation you referred to is outdated. You may refer to the following steps (workaround) to convert yolov4 to IR:
cd /opt/intel/openvino_2021/deployment_tools/tools/model_downloader
sudo python3 downloader.py --name=yolo-v4-tf
Rename your weight file to yolov4.weights and replace to the following directory:
/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf
Rename your config file to yolov4.cfg and replace to the following directory:
/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf/keras-YOLOv3-model-set/cfg
cd /opt/intel/openvino_2021/deployment_tools/open_model_zoo/models/public/yolo-v4-tf
sudo python3 pre-convert.py "/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf" "/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf"
yolo-v4.savedmodel will be generated in the following directory:
/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf
cd /opt/intel/openvino_2021/deployment_tools/model_optimizer
sudo python3 mo.py --framework=tf --data_type=FP16 --output_dir=/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf/FP16 --model_name=yolo-v4-tf --input_shape=[1,416,224,3] --input=image_input --scale_values=image_input[255] --reverse_input_channels --saved_model_dir=/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf/yolo-v4.savedmodel
The Intermediate Representation will be generated in the following directory:
/opt/intel/openvino_2021/deployment_tools/tools/model_downloader/public/yolo-v4-tf/FP16
Regards,
Wan
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
thank you so much Wan, I really appreciate your help
it's now converted and reshaped 🤩
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi Mostafa-,
Glad to know that everything is going well.
This thread will no longer be monitored since this issue has been resolved.
If you need any additional information from Intel, please submit a new question.
Regards,
Wan
