Send picture telegram - NO USB CAMERA

That's for another purpose (processing time measuring), just replace the node type

Ok, but do are you using the whole node with Telegram?.
Tks!

Yes, is just like before. The Switch node I added is just checking that msg.url is not empty before sending the http request. Also note that you have to configure the viewer to show msg.image

Mmm ok, i think i have an issue:

And the main goal is to have the output for the viewer or the Image node (both are the same) ir order to tell me what the picture object is (dog, car, etc). We are missing that i think.

Yes, no analyze is taking place. Did you ever see "Model ready" like in my picture above?

'Right, reminds me, think you are running NR on Windows??? Are you? Not sure the coco node will work there. But it seems it installed ok?

Did you set a password in settings.js?

What if you leave blank in the url field

image

I have Node-red Dockerized on ubuntu server. I can install the palette perfectly. I mean, that is not a problem because i have another palette working perfectly.

I cannot see the "Model Ready" message as you do. So maybe there is the issue, but i have it configured as you do. So, a thing less to review.

Let's try if you can have the COCOSSD output so you can determine what the object is and if you get that result via debug. Because if i do it without the Telegram node (as i mentioned on the top of this thread) it works perfectly.
This is that code:

[{"id":"28cdadc8.e454e2","type":"tab","label":"TensorFlow","disabled":false,"info":""},{"id":"fd2a033b.71ad2","type":"fileinject","z":"28cdadc8.e454e2","name":"","x":180,"y":120,"wires":[["ff61bbb2.6de208","9b2fdae2.c3fda8"]]},{"id":"9b2fdae2.c3fda8","type":"cocossd","z":"28cdadc8.e454e2","name":"","x":440,"y":120,"wires":[["bd78d3b7.3cf9c","cb45eb12.edfe58"]]},{"id":"bd78d3b7.3cf9c","type":"debug","z":"28cdadc8.e454e2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":790,"y":120,"wires":[]},{"id":"ff61bbb2.6de208","type":"image","z":"28cdadc8.e454e2","name":"Original image","width":"160","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":310,"y":200,"wires":[]},{"id":"cb45eb12.edfe58","type":"image","z":"28cdadc8.e454e2","name":"","width":"160","data":"annotatedInput","dataType":"msg","thumbnail":false,"active":true,"pass":false,"outputs":0,"x":600,"y":200,"wires":[]}]

For me it works just fine (only diff. I changed your file inject node to a link from where my image data comes from). I also get the message "person" in the debug window.

I believe it could be something with your environment. Have you tried it outside docker? I think tensorflow needs to be built to the specific cpu architecture you have but since you could install the nodes, I do not know where the problems could be. Myself I run the stuff only on RPi's so not much I can help yuo with in respect to supported architectures etc

One thing about Telegram I have noticed. Maybe this is what is the real problem. When I send a picture from my phone, I cannot send to the same bot that I'm sending from. So if I send from "chat_one" in my phone I send to "chat_two" that is used in NR. Then it works fine, at least for me. Each bot has it's own token

EDIT: maybe I am wrong, it seems to work all ways today

Uhm ok...that's where the problem could be. Maybe i have to create another bot specially for this function and that has logic because im using the same Bot for everything and somehow it crashes somewhere.
I will try that!

Thanks a lot!

Anyway is a good idea to have a dedicated bot for the receiving node. I think it is more stable

Yes it is, still not working but i'm gonna find out. The thing is i don't understand why the node COCOSSD get stuck in "analyzing", i don't even can see the debug ouput. Weird.

Thanks!

Maybe, this is just a guess, you can see something in the NR log. If you start node-red-log in a terminal and then send an image for analyzing...

Yes, this is the terminal log.

Maybe there is a problem with the node cocossd?

If I'm correctly informed, I think Jimp is used for image manipulation. So maybe it gets stucked there, it fails when parsing the image

If you Google the actual error you will find several similar issues with jimp. One of them could eventually be a lead. Is said could be caused by race conditions between jimp and the file system

How to fix, I have no idea. Could it be because you run this in Docker??

Error: Could not find MIME for Buffer

After rewriting all of my code that calls jimp as noted above, I no longer have these problems. I believe I can now confirm that the issues I was having were race conditions between jimp code and the file system.

Great, yes, i've google it a liitle and i found more information about it.

I have doubt about the HTTP request node because the problem is there i think and how the node handle the url request as mentioned on your git hub post. They say something about it.
And is weird because if you go back to the initial flow (with no telegram) it works fine.

Also, i have this version of JIMP inside my package.json file.
image
Could you tell me yours?

I will keep looking for...

I have "jimp": "^0.16.1",

i've upload it to that version. Let see what happens....

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.