Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convertPytorchToONNX.py #4

Open
Minnchong opened this issue Mar 30, 2023 · 3 comments
Open

convertPytorchToONNX.py #4

Minnchong opened this issue Mar 30, 2023 · 3 comments
Labels
question Further information is requested

Comments

@Minnchong
Copy link

I successfully converted the curvelanes/tusimple.pth into curvelanes/tusimple.onnx. When I try to achieve culane.onnx, the process was killed at torch.onnx.export(net, img, onnx_file_path, verbose=True).

@jason-li-831202
Copy link
Owner

I haven't encountered this issue before, could you provide me with the error traceback? Also, if you want better performance, I suggest using the ultra-fast lane detection v2 version would be better.

@jason-li-831202 jason-li-831202 added the question Further information is requested label Jun 7, 2023
@Jilin-Cancer
Copy link

I also encountered a similar problem where the operation was terminated abnormally

C:\Users\86152\anaconda3\envs\lane-det\python.exe C:/Users/86152/Desktop/AI/code/Vehicle-CV-ADAS-master/TrafficLaneDetector/convertPytorchToONNX.py
Model Type : UFLDV2_TUSIMPLE
C:\Users\86152\anaconda3\envs\lane-det\lib\site-packages\torchvision\models_utils.py:209: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
f"The parameter '{pretrained_param}' is deprecated since 0.13 and may be removed in the future, "
C:\Users\86152\anaconda3\envs\lane-det\lib\site-packages\torchvision\models_utils.py:223: UserWarning: Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=ResNet18_Weights.IMAGENET1K_V1. You can also use weights=ResNet18_Weights.DEFAULT to get the most up-to-date weights.
warnings.warn(msg)

Process finished with exit code -1073741819 (0xC0000005)

@jason-li-831202
Copy link
Owner

In torchvision 0.13, there were updates to the pre-trained model loading. I believe there might be compatibility issues with the provided .pth files by the original author.

you can download the onnx model using the following script: https://github.com/PINTO0309/PINTO_model_zoo/blob/main/324_Ultra-Fast-Lane-Detection-v2/download.sh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants