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

Fixed IndexError & NameError #23

Merged
merged 1 commit into from
Jul 21, 2021
Merged

Fixed IndexError & NameError #23

merged 1 commit into from
Jul 21, 2021

Conversation

M00-M00
Copy link
Contributor

@M00-M00 M00-M00 commented Jul 20, 2021

Line:43 changed if len(dets) < 0: to if len(dets) <= 0: as previously if no face is detected it would not be "caught" in if part. This used to result in IndexError

Line:52-126 - moved lines inside else fixing an NameError and excluding images with dets less than 1

[Line:43](https://github.com/mindslab-ai/faceshifter/edit/master/preprocess/preprocess.py#L43)  changed `if len(dets) < 0:` to `if len(dets) <= 0:` as previously if no face is detected it would not be "caught" in `if` part.  This used to result to `IndexError`

[Line:52-126](https://github.com/mindslab-ai/faceshifter/edit/master/preprocess/preprocess.py#L52-126) - moved lines inside `else` fixing an `NameError` and excluding images with `dets` was less than 1
@usingcolor
Copy link
Contributor

lgtm. Are you the same person as Ewan?

@usingcolor usingcolor merged commit d232459 into maum-ai:master Jul 21, 2021
@M00-M00
Copy link
Contributor Author

M00-M00 commented Jul 21, 2021 via email

@M00-M00 M00-M00 deleted the patch-1 branch August 10, 2021 15:55
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

Successfully merging this pull request may close these issues.

2 participants