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

[BUG]: <DeepFace Library Integration Issue in Android Application> #1259

Closed
2 tasks done
vinayakvigo opened this issue Jun 17, 2024 · 1 comment
Closed
2 tasks done
Labels
bug Something isn't working dependencies Pull requests that update a dependency file

Comments

@vinayakvigo
Copy link

Before You Report a Bug, Please Confirm You Have Done The Following...

  • I have updated to the latest version of the packages.
  • I have searched for both existing issues and closed issues and found none that matched my issue.

DeepFace's version

0.0.92

Python version

3.8.5

Operating System

windos

Dependencies

Summary
When integrating the DeepFace library with an Android application using Python Chaquopy, the verify function generates an error: list indices must be integers or slices, not str. This issue occurs despite the same code running correctly in a Python interpreter.

Environment
DeepFace Library Version: 0.0.92
Python Integration Tool: Chaquopy
Android Application: Custom-built application using Chaquopy for Python integration
Issue Details
Error Description:

Error Message: list indices must be integers or slices, not str
Occurrence: The error is encountered when invoking the verify function of the DeepFace library within the Android environment.
Behavior:

The code executes without issues in a standalone Python interpreter.
The same code, when executed in the Android application through Chaquopy, results in the mentioned error.
Steps to Reproduce:

Integrate the DeepFace library in an Android application using Chaquopy.
Configure the application and ensure the library is installed successfully.
Execute the verify function with valid image paths or URLs.
Observe the error: list indices must be integers or slices, not str.
Debugging Attempts:

Verified that the input variables passed to the verify function are correct and match the expected types.
Tried using both local storage image paths and online image URLs as input.
Ensured that the latest version of the DeepFace library (0.0.92) is being used.

Expected Behavior
The verify function should execute without errors and return the verification results.

Actual Behavior
The verify function raises an error: list indices must be integers or slices, not str.

Request
Please investigate and resolve this issue to ensure the verify function works correctly within the Android application using Chaquopy. Any insights or fixes would be greatly appreciated.

s6
s5
s2
s4
s3
s1

Reproducible example

from deepface import DeepFace

# Sample images for verification
img1_path = "image1.jpg"  # Local storage path
img2_path = "image2.jpg"  

# Verify function call
try:
    result = DeepFace.verify(img1_path, img2_path)
    print(result)
except Exception as e:
    print(f"Error: {e}")

Relevant Log Output

error : list indices must be integers or slices, not str

Expected Result

The verify function should execute without errors and return the verification results.

What happened instead?

The verify function raises an error: list indices must be integers or slices, not str.

Additional Info

If you require any further details or logs, please let me know. Thank you for your assistance!

@vinayakvigo vinayakvigo added the bug Something isn't working label Jun 17, 2024
@serengil
Copy link
Owner

serengil commented Jun 17, 2024

If no issue in regular python, then it means no bug.

Deepface has no support for android. You may consider to open this issue in Chaquopy repo.

@serengil serengil added the dependencies Pull requests that update a dependency file label Jun 17, 2024
@serengil serengil closed this as not planned Won't fix, can't repro, duplicate, stale Jun 17, 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 dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants