Skip to main content

Hello,

I am currently working on lane detection model (YOLOv2) which is in .pt format I have converted to ONNX format.

Here are the terminal responses I have got..

root@aetina:/voyager-sdk# cd YOLOPv2
root@aetina:/voyager-sdk/YOLOPv2# ls
LICENSE    data     demo2.py        models            runs   yolopv2-env
README.md  demo.py  export-onnx.py  requirements.txt  utils
root@aetina:/voyager-sdk/YOLOPv2# cd models
root@aetina:/voyager-sdk/YOLOPv2/models# ls
__pycache__  common.py  experimental.py  yolopv2.onnx  yolopv2.pt
root@aetina:/voyager-sdk/YOLOPv2/models# 


I am having the ONNX format of the model so now I want to deploy the model onto Metis M2. When I am trying to compile the yolopv2.onnx model but i am encountering this issue.

root@aetina:/voyager-sdk# /voyager-sdk/bin/voyager-compile models/yolopv2.onnx --output-dir build/yolopv2 --input-shape "1,3,640,640"
bash: /voyager-sdk/bin/voyager-compile: No such file or directory

I request to guide me to successfully deploy the model.


Note; I am using docker and runing the Voyager sdk in it.
 

Hi ​@saravanan! Awesome that you’re still working on this project - really want to see it in action!

Is it because you need to first create a YAML file to describe your ONNX model for Voyager, and then use deploy.py instead? Like:

./deploy.py <path/to/your/yaml_file.yaml>

Bit more info here: https://github.com/axelera-ai-hub/voyager-sdk/blob/release/v1.2.5/docs/reference/deploy.md

Let me know if that helps!


Hi ​@Spanner ! Thank you for the link.I will try it now.
Actually I encountering issue in running the object detection using inference.py which is..

./inference.py yolov5s-v7-coco usb:0

this one while i am running this command

root@aetina:/voyager-sdk# source venv/bin/activate
(venv) root@aetina:/voyager-sdk# ./inference.py yolov5s-v7-coco usb:0
INFO    : Using device metis-0:1:0
ERROR   : module 'axelera.app.yaml_parser' has no attribute 'attribute'


I am getting this error could you please take a look at this one..

for your understanding
(venv) root@aetina:/voyager-sdk# ls
CHANGELOG.md    core.41               licenses
LICENSE.txt     core.442              media
Makefile        core.824              operators
ObjectDetector  customers             parseyaml.py
README.md       data                  pipeline-template
YOLOPv2         deploy.py             pipeline.yaml
ax_datasets     docs                  protos
ax_evaluators   download_prebuilt.py  pyproject.toml
ax_models       examples              requirements.osx.txt
axelera         gst                   requirements.runtime.txt
benchmark.py    inference.py          requirements.unittests.txt
build           inference_client.py   tests
cfg             inference_server.py   tools
core.1144       install.sh            tox.ini
core.1209       installer_support.py  trackers
core.40         launch-docker.sh      venv
 


Hi Saravanan,

 

Would you be able to try again but add the tag -vv to your inference.py command?

This might help narrow down what is causing this issue.

 

 


Hi  ​@might-be-david,

after running this command I am encountering this error... 

(venv) root@aetina:/voyager-sdk# ./inference.py -vv yolov5s-v7-coco usb:0
DEBUG   :axelera.app.inf_tracers: HostTracer will write to /tmp/tmpiqjqdnp2
INFO    :axelera.app.device_manager: Using device metis-0:1:0
DEBUG   :axelera.app.network: Create network from /voyager-sdk/ax_models/zoo/yolo/object_detection/yolov5s-v7-coco.yaml
TRACE   :axelera.app.utils: Changing weight_path from weights/yolov5s-v7.pt to /root/.cache/axelera/weights/yolov5s-v7-coco/yolov5s-v7.pt
TRACE   :axelera.app.utils: Changing template_path from $AXELERA_FRAMEWORK/pipeline-template/yolo-letterbox.yaml to /voyager-sdk/pipeline-template/yolo-letterbox.yaml
TRACE   :axelera.app.utils: Changing class_path from $AXELERA_FRAMEWORK/ax_models/yolo/ax_yolo.py to /voyager-sdk/ax_models/yolo/ax_yolo.py
TRACE   :axelera.app.utils: Changing weight_path from weights/yolov5s-v7.pt to /voyager-sdk/ax_models/zoo/yolo/object_detection/weights/yolov5s-v7.pt
TRACE   :axelera.app.utils: Changing class_path from $AXELERA_FRAMEWORK/ax_datasets/objdataadapter.py to /voyager-sdk/ax_datasets/objdataadapter.py
TRACE   :axelera.app.utils: Changing labels_path from $AXELERA_FRAMEWORK/ax_datasets/labels/coco.names to /voyager-sdk/ax_datasets/labels/coco.names
TRACE   :axelera.app.utils: Changing repr_imgs_dir_path from $AXELERA_FRAMEWORK/data/coco2017_400_b680128 to /voyager-sdk/data/coco2017_400_b680128
TRACE   :axelera.app.utils: Changing template_path from $AXELERA_FRAMEWORK/pipeline-template/yolo-letterbox.yaml to /voyager-sdk/pipeline-template/yolo-letterbox.yaml
TRACE   :axelera.app.utils: Changing class_path from $AXELERA_FRAMEWORK/ax_models/yolo/ax_yolo.py to /voyager-sdk/ax_models/yolo/ax_yolo.py
TRACE   :axelera.app.utils: Changing class_path from $AXELERA_FRAMEWORK/ax_datasets/objdataadapter.py to /voyager-sdk/ax_datasets/objdataadapter.py
TRACE   :axelera.app.utils: Changing labels_path from $AXELERA_FRAMEWORK/ax_datasets/labels/coco.names to /voyager-sdk/ax_datasets/labels/coco.names
TRACE   :axelera.app.utils: Changing repr_imgs_dir_path from $AXELERA_FRAMEWORK/data/coco2017_400_b680128 to /voyager-sdk/data/coco2017_400_b680128
TRACE   :axelera.app.utils: Changing class_path from $AXELERA_FRAMEWORK/ax_models/decoders/yolo.py to /voyager-sdk/ax_models/decoders/yolo.py
ERROR   : module 'axelera.app.yaml_parser' has no attribute 'attribute'
ERROR   : Traceback (most recent call last):
ERROR   :   File "/voyager-sdk/./inference.py", line 93, in <module>
ERROR   :     stream = init(args, tracers)
ERROR   :   File "/voyager-sdk/./inference.py", line 21, in init
ERROR   :     pipemanager = pipe.PipeManager(
ERROR   :   File "/voyager-sdk/axelera/app/pipe/manager.py", line 214, in __init__
ERROR   :     nn = network.parse_network_from_path(network_path, self.eval_mode, data_root)
ERROR   :   File "/voyager-sdk/axelera/app/network.py", line 973, in parse_network_from_path
ERROR   :     return _parse_network(path, yaml, eval_mode, data_root, from_deploy)
ERROR   :   File "/voyager-sdk/axelera/app/network.py", line 835, in _parse_network
ERROR   :     _find_template_custom_operators(custom_operators, yaml)
ERROR   :   File "/voyager-sdk/axelera/app/network.py", line 655, in _find_template_custom_operators
ERROR   :     _register_custom_operators(path, custom_operators, template_yaml)
ERROR   :   File "/voyager-sdk/axelera/app/network.py", line 631, in _register_custom_operators
ERROR   :     cls = YAML.attribute(attribs, 'class')
ERROR   : AttributeError: module 'axelera.app.yaml_parser' has no attribute 'attribute'
(venv) root@aetina:/voyager-sdk# 


Reply