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

Issue with loading model in MiniXception #341

Open
Y-Srivaishnavi opened this issue Oct 8, 2024 · 0 comments
Open

Issue with loading model in MiniXception #341

Y-Srivaishnavi opened this issue Oct 8, 2024 · 0 comments

Comments

@Y-Srivaishnavi
Copy link

I tried to test the MiniXceptionFER emotion classifier on a single image.

The Code:

emo_detect = MiniXceptionFER()
X_test, y_test = load_images_from_directory("data\\test")
image = cv2.cvtColor(X_test[0], cv2.COLOR_GRAY2RGB)
emo_detect(image)

This is the error it raised:

C:\Users\Uname\AppData\Local\Programs\Python\Python311\Lib\site-packages\keras\src\optimizers\base_optimizer.py:34: UserWarning: Argument `decay` is no longer supported and will be ignored.
  warnings.warn(
Traceback (most recent call last):
  File "c:\Users\Uname\file_path\file_name.py", line 38, in <module>
    emo_detect = MiniXceptionFER()
                 ^^^^^^^^^^^^^^^^^
  File "C:\Users\Uname\AppData\Roaming\Python\Python311\site-packages\paz\pipelines\classification.py", line 38, in __init__  
    self.classifier = MiniXception((48, 48, 1), 7, weights='FER')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Uname\AppData\Roaming\Python\Python311\site-packages\paz\models\classification\xception.py", line 106, in MiniXception
    model = load_model(path)
            ^^^^^^^^^^^^^^^^
. . .

  File "C:\Users\2003y\AppData\Local\Programs\Python\Python311\Lib\site-packages\keras\src\optimizers\base_optimizer.py", line 38, in __init__
    raise ValueError(f"Argument(s) not recognized: {kwargs}")
ValueError: Argument(s) not recognized: {'lr': 1.0000000656873453e-05}

I checked the source code and model = load_model(path) isn't a part of xception.py. I've installed pypaz only yesterday, so I shouldn't have to upgrade it either. Am I missing something?

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