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.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.

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.

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:


then start messing with this module:


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


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():

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:


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!