Skip to content

tensorflow.python.framework.errors_impl.InvalidArgumentError: Requested tensor connection from unknown node: "input:0". when running through flask #21

@Prateeksiri

Description

@Prateeksiri

We are doing unique person detection referring to the GitHub provided. We are getting the results when running through the test scripts in our local.
But when we tried to call it through flask, we are facing the error: tensorflow.python.framework.errors_impl.InvalidArgumentError: Requested tensor connection from unknown node: "input:0".
When analyzing the logs we could see that the model is not passing from the yolov3 prediction
image

Please find the image for reference.

All the models we have used are from the github repo : https://github.com/emasterclassacademy/Single-Multiple-Custom-Object-Detection-and-Tracking/blob/master/yolov3_tf2/models.py
The input which we are providing is: {"Fid": "637971158700262646", "Did": "DeviceId_11", "Tid": "1", "Cs": 0.5, "Yt": 0.6, "Per": []}

We assume there is an issue with assigning the graph hence providing the code here.

graph = tf.compat.v1.get_default_graph()
with graph.as_default():
boxes, scores, classes, nums = yolo.predict(img_in, steps=1)

Any suggestions/ideas to overcome this issue would be really helpful.

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