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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 馃悶 Probably a folder path issue in image mode? #118

Open
wengchenyang1 opened this issue Feb 25, 2024 · 0 comments
Open

[BUG] 馃悶 Probably a folder path issue in image mode? #118

wengchenyang1 opened this issue Feb 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@wengchenyang1
Copy link

Describe the bug
Hello,
There seems to be a tiny issue with the image mode. According to the sample code, I need to give the image file name while using the image mode:

python -m earsegmentationai.main picture-capture --folderpath "/path/filename.png" --device "cpu"

and this is safeguarded in the following code

if path.isfile(folderPath) is False:
print("Please use valid file path")
return
if folderPath.lower().endswith((".png", ".jpg", ".jpeg")) is False:
print("Please use valid file extension")
return

However, in ear_segmentation_image the passed path is supposed to be a folder path that contains the picture(s)

data_samples: list[str] = (
glob(folder_path + "/*.jpg")
+ glob(folder_path + "/*.jpeg")
+ glob(folder_path + "/*.png")
)

then I guess data_samples will be empty all the time if file path is given?

To Reproduce

  1. Run the example code of the image mode, provided in the README.MD
  2. Image cannot be found
@wengchenyang1 wengchenyang1 added the bug Something isn't working label Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant