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

Update path to pretrained yolox asset #172

Merged
merged 3 commits into from
Dec 22, 2021
Merged

Update path to pretrained yolox asset #172

merged 3 commits into from
Dec 22, 2021

Conversation

pjbull
Copy link
Member

@pjbull pjbull commented Dec 22, 2021

Videos weren't loading in latest version, and we were seeing a lot of these errors:

2021-12-17 01:11:44.274 | WARNING  | zamba.pytorch.dataloaders:__getitem__:118 - Video /data/blank3.mp4 could not be loaded. Using an array of all zeros instead.

Upon debugging, discovered this was because of the following stack trace:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/dist-packages/zamba/data/video.py", line 468, in load_video_frames
    mdlite = MegadetectorLiteYoloX(config=config.megadetector_lite_config)
  File "/usr/local/lib/python3.8/dist-packages/zamba/object_detection/yolox/megadetector_lite_yolox.py", line 88, in __init__
    checkpoint = torch.load(path, map_location=config.device)
  File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 594, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 230, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 211, in __init__
    super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.8/dist-packages/zamba/object_detection/yolox/assets/yolox_nano_20210901.pth'

Looks like this was introduced when #167 was merged.

Added extra test to make sure YoloX can load so we will catch an error like this with CI in the future.

@pjbull pjbull requested a review from r-b-g-b December 22, 2021 01:08
@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2021

@codecov
Copy link

codecov bot commented Dec 22, 2021

Codecov Report

Merging #172 (8d8b965) into master (380d23f) will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master    #172   +/-   ##
======================================
  Coverage    85.0%   85.0%           
======================================
  Files          30      30           
  Lines        1851    1851           
======================================
  Hits         1575    1575           
  Misses        276     276           

Copy link
Contributor

@r-b-g-b r-b-g-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, sorry for missing that!

@pjbull pjbull merged commit f02284c into master Dec 22, 2021
@pjbull pjbull deleted the add-yolox-asset-back branch December 22, 2021 21:42
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