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

deploy_api问题 #221

Open
pengdou opened this issue Dec 12, 2024 · 0 comments
Open

deploy_api问题 #221

pengdou opened this issue Dec 12, 2024 · 0 comments

Comments

@pengdou
Copy link

pengdou commented Dec 12, 2024

启动deploy_api.py后,通过api访问,人像分割模型参数,使用hivision_modnet、rmbg-1.4、birefnet-v1-lite 都没有问题,使用modnet_photographic_portrait_matting时,python后台会看到报错(截取了最后部分)
File "/opt/homebrew/anaconda3/envs/HivisionIDPhotos/lib/python3.10/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
return await dependant.call(**values)
File "/Volumes/Untitled/Keep/HivisionIDPhotos-master/deploy_api.py", line 73, in idphoto_inference
result = creator(
File "/Volumes/Untitled/Keep/HivisionIDPhotos-master/hivision/creator/init.py", line 184, in call
adjust_photo(ctx)
File "/Volumes/Untitled/Keep/HivisionIDPhotos-master/hivision/creator/photo_adjuster.py", line 51, in adjust_photo
y_top, y_bottom, x_left, x_right = U.get_box(
File "/Volumes/Untitled/Keep/HivisionIDPhotos-master/hivision/creator/utils.py", line 87, in get_box
idx = contours_area.index(max(contours_area))
ValueError: max() arg is an empty sequence
请问大佬们有没有解决办法啊

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

No branches or pull requests

1 participant