serengil / deepface

A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python
https://www.youtube.com/watch?v=WnUVYQP4h44&list=PLsS_1RYmYQQFdWqxQggXHynP1rqaYXv_E&index=1
MIT License
10.85k stars 1.91k forks source link

[BUG]: represent accidentally converting back to rgb #1262

Closed logasja closed 1 week ago

logasja commented 1 week ago

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

DeepFace's version

0.0.90

Python version

DeepFace Docker Environment

Operating System

DeepFace Docker Environment

Dependencies

Using DeepFace Docker Environment

Reproducible example

In representation.py starting at line 98:

If skipping detection and loading an image directly, line 82:

img, _ = image_utils.load_image(img_path)

will return a bgr image which is then reversed to rgb at line 103:
```python
img = img[:, :, ::-1]


### Relevant Log Output

_No response_

### Expected Result

_No response_

### What happened instead?

_No response_

### Additional Info

_No response_
serengil commented 1 week ago

It is independent you skip or not detection. Images are fed as rgb to cnn models. Its corresponding comment has typo but it is not a bug.

logasja commented 1 week ago

So then the expected input to the trained models is RGB and not BGR?

serengil commented 1 week ago

Closing this because it is not an issue. But feel free to continue to discuss in this thread if you have any questions or concerns.

logasja commented 1 week ago

Thank you for the clarification, I have been using the models directly and thought they were trained in BGR.