thtrieu / darkflow

Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices
GNU General Public License v3.0
6.13k stars 2.08k forks source link

How to call the algorithm from another project and return the detections #1138

Open JABBeeson opened 4 years ago

JABBeeson commented 4 years ago

Hello, I am wanting to output "boxes" (an array BoundBox) at real time to another program, whilst processing video. Has this functionality already been implemted? If not at what point should I output the boxes array?

11/02/2020 - I've followed the list of boxes to return_predict in flow.py (76), I hope its as simple as calling this function. Although I don't know if I get the data mid cycle it will give me data that isnt fully matured or incomplete

20/02/2020 - Hello, I'm going to have to alter the code so that before it begins to draw the bounding boxes and then save the new image, it just outputs the predictions from return_predict()

JABBeeson commented 4 years ago

Hello, Sorry I can’t help. I did get it to work but I didn’t have that issue. I haven’t looked at it for a month now and the code I was working on is at work, which I can’t access. Good luck though!

From: avinashkr29 notifications@github.com Sent: 10 April 2020 20:43 To: thtrieu/darkflow darkflow@noreply.github.com Cc: JABBeeson Joe.Beeson@outlook.com; Mention mention@noreply.github.com Subject: Re: [thtrieu/darkflow] How to call the algorithm from another project and return the detections (#1138)

Hello @JABBeesonhttps://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJABBeeson&data=02%7C01%7C%7C22d076d6bcaa46bb6c8c08d7dd8761ce%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637221445832718323&sdata=N3lgoc5hHZr67IM0wYPJZGFtzHj0k4bjUxQJZjp8kx8%3D&reserved=0 Did you find any solution? I am getting the following error while trying to pass ndarray of image.

Do you know where I am committing the mistake?

TypeError Traceback (most recent call last)

in 1 #image_np_expanded = np.expand_dims(imgcv, axis=0) ----> 2 result = TFNet.return_predict(imgcv) 3 print(result) TypeError: return_predict() missing 1 required positional argument: 'im' — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.