Skip to content

fix to run on TF2.4  #173

Description

@albertnew2012

I don't understand why the code wouldn't run on TF2.4, but I found the reason causing the failure. Taking detection_demo.py as an example, detect_video, detect_realtime and detect_screen all fail, but one just needs to make a tiny change in utils.py:

        if YOLO_FRAMEWORK == "tf":
            pred_bbox = yolo.predict(image_data)

by changing yolo.predict->yolo, then it works like a charm again.
I looked up online, it seems there is no difference between model.predict() and model(), but anyhow it fails the code in TF2.4.

Happy learning,
Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions