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]: Corrupt image datetime causes classifier to fail #269

Open
1 task done
rcwhytock opened this issue Apr 18, 2022 · 0 comments
Open
1 task done

[Bug]: Corrupt image datetime causes classifier to fail #269

rcwhytock opened this issue Apr 18, 2022 · 0 comments

Comments

@rcwhytock
Copy link
Contributor

Guidelines

  • I agree to follow this project's Contributing Guidelines.

Project Version

1.3

Platform and OS Version

Windows 11

Existing Issues

No response

What happened?

If images have impossible/corrupt dates in Exif data then the classifier fails.

Steps to reproduce

...

Expected behavior

Images to be classified and .csv output. If date is not present or corrupt should return NA and continue classifying

Attachments

[
infer_to_csv
Found 37 images
Loading model: C:\Users\rcwhy\AppData\Roaming\Mbaza AI\models\central_african_forests\trained_model.pkl.
Model loaded.
No GPU detected.
Starting inference. time=2022-04-18 11:34:33.422235
Inference complete. It took 0:00:48.263688.

19176] Failed to execute script main
C:\Users\timl\miniconda3\envs\hello\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:623: MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
Traceback (most recent call last):
File "site-packages\pandas\core\tools\datetimes.py", line 450, in _convert_listlike_datetimes
File "pandas_libs\tslibs\conversion.pyx", line 350, in pandas._libs.tslibs.conversion.datetime_to_datetime64
TypeError: Unrecognized value type: <class 'str'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 111, in
File "inference.py", line 250, in infer_to_csv
File "inference.py", line 153, in parse_exif
File "site-packages\pandas\core\tools\datetimes.py", line 828, in to_datetime
File "site-packages\pandas\core\tools\datetimes.py", line 454, in _convert_listlike_datetimes
File "site-packages\pandas\core\tools\datetimes.py", line 418, in _convert_listlike_datetimes
File "pandas_libs\tslibs\strptime.pyx", line 318, in pandas._libs.tslibs.strptime.array_strptime
File "pandas_libs\tslibs\strptime.pyx", line 304, in pandas._libs.tslibs.strptime.array_strptime
ValueError: day is out of range for month

Screenshots or Videos

No response

Additional Information

No response

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