Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
Because of un-manageable amounts of spam despite our use of CAPTCHAs, email authorization, and other tools, we have discontinued this forum (see the 700k+ registered users with validated email addresses at right?). Please email us any questions or post bug reports and feature requests on GitHub at https://github.com/jevois -- The content below remains available for future reference.

How can I save the object names and x,y coordinates of objects identified with Darknet/YOLO to disk on my PC?

0 votes
I need the ability to save the information to disk. I can do a bit of python programming, but I'm not sure where (what file and the location of that file) I would make the code changes.

Any help would be appreciated.

Thomas
asked Sep 18, 2018 in User questions by thomasmesserschmidt (120 points)

1 Answer

0 votes
I would start with this one to understand the workflow: http://jevois.org/tutorials/ProgrammerInvHello.html

then check out the other python tutorials that use the inventor:

http://jevois.org/tutorials/ProgrammerTutorials.html

then start messing with this module:

http://jevois.org/moddoc/PyDetectionDNN/modinfo.html

it is written in python and can run YOLO. You select YOLO in the param.cfg file (under the Config tab of the inventor). Then edit the code under the Code tab.

in the drawPred() function all the info you need has been parsed: left, top, right, bottom of the box, and label contains the class name and confidence score

so somewhere in there you would add code to write that to microSD using standard python file access

you would typically open the file in the module's constructor (__init__()) so that you only open it once, not on every frame. Then on every frame you write more entries to your file. Usually we recommend writing data to /jevois/data/ which you then find on your microsd card as JEVOIS:/data

maybe something like this

https://www.pythonforbeginners.com/files/reading-and-writing-files-in-python

just remember to open only once and store the file object as a member of your class, something like, in __init__():

self.myfile = open('/jevois/data/yolo.log', 'w')

then in process():

self.myfile.write(...........)
answered Sep 18, 2018 by JeVois (46,580 points)
sorry I realize now that your question was about saving to PC disk, not to microSD inside jevois.

So for that you need to grab the messages issued by JeVois on your PC and save them to disk on your PC.

see here for python code to run on PC that parses messages from jevois:

http://jevois.org/tutorials/UserParseSerial.html

and then just add some file output as described in my first answer.
Thank you. And thank you VERY much for the lecture at RSSC.  --Thomas
Most welcome, I was very impressed with your group, lots of very interesting questions and insights!
...