We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
你好,我在将tusimple_res18.pth转化为tusimple_res18.engine,但是在tusimple数据集上的测试结果非常差?麻烦帮我看看转换有什么问题,非常感谢!首先我利用deploy/pt2onnx.py --config_path configs/tusimple_res18.py --model_path weight/tusimple_res18.pth将其转换为tusimple_res18.onnx,在pt2onnx.py我修改了parser.add_argument('--size', default=(800, 320), help='size of original frame', type=tuple)中为800,320,然后利用trtexec --onnx=weight/tusimple_res18.onnx --saveEngine=weights/tusimple_res18.engine继续转化格式,最后在推理阶段python deploy/trt_infer.py --config_path configs/tusimple_res18.py --engine_path weight/tusimple_res18.engine,将trt_infer.py进行了如下修改 def get_args(): parser = argparse.ArgumentParser() parser.add_argument('--config_path', default='configs/culane_res34.py', help='path to config file', type=str) parser.add_argument('--engine_path', default='weights/culane_res34.engine', help='path to engine file', type=str) parser.add_argument('--ori_size', default=(800, 320), help='size of original frame', type=tuple) return parser.parse_args()
if name == "main": args = get_args() isnet = UFLDv2(args.engine_path, args.config_path, args.ori_size) img=cv2.imread('./test/1.jpg') #img = img[380:700,:, :] isnet.forward(img) 但是,测试的结果如下:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
你好,我在将tusimple_res18.pth转化为tusimple_res18.engine,但是在tusimple数据集上的测试结果非常差?麻烦帮我看看转换有什么问题,非常感谢!首先我利用deploy/pt2onnx.py --config_path configs/tusimple_res18.py --model_path weight/tusimple_res18.pth将其转换为tusimple_res18.onnx,在pt2onnx.py我修改了parser.add_argument('--size', default=(800, 320), help='size of original frame', type=tuple)中为800,320,然后利用trtexec --onnx=weight/tusimple_res18.onnx --saveEngine=weights/tusimple_res18.engine继续转化格式,最后在推理阶段python deploy/trt_infer.py --config_path configs/tusimple_res18.py --engine_path weight/tusimple_res18.engine,将trt_infer.py进行了如下修改
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument('--config_path', default='configs/culane_res34.py', help='path to config file', type=str)
parser.add_argument('--engine_path', default='weights/culane_res34.engine',
help='path to engine file', type=str)
parser.add_argument('--ori_size', default=(800, 320), help='size of original frame', type=tuple)
return parser.parse_args()
if name == "main":
![result](https://private-user-images.githubusercontent.com/43298195/326373849-4dbcdbd8-5df2-44a0-bada-0ad6e4fc9fae.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMjMxMzMsIm5iZiI6MTcyNjEyMjgzMywicGF0aCI6Ii80MzI5ODE5NS8zMjYzNzM4NDktNGRiY2RiZDgtNWRmMi00NGEwLWJhZGEtMGFkNmU0ZmM5ZmFlLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDA2MzM1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg3OWMzZjQwNjJjM2ZiZjYzNWNhMWFhYWNmMWY3NTMwYWMwNjk5OGI3ZGQzNmMwNjYxMWE5NDliMTMxMzA0MTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.FXvJyeQbTj1Sxqoiw8Q0r2TOO8eCpfFldPx8vQnbJsI)
args = get_args()
isnet = UFLDv2(args.engine_path, args.config_path, args.ori_size)
img=cv2.imread('./test/1.jpg')
#img = img[380:700,:, :]
isnet.forward(img)
但是,测试的结果如下:
The text was updated successfully, but these errors were encountered: