Giter Site home page Giter Site logo

Comments (10)

obendidi avatar obendidi commented on May 18, 2024

to get all detection + the people tracking, you can just change this line in darkflow to something like this :

if self.FLAGS.trackObj != mess :
       cv2.rectangle(imgcv,
			(left, top), (right, bot),
			colors[max_indx], thick)
       cv2.putText(imgcv, mess, (left, top - 12),
			0, 1e-3 * h, colors[max_indx],thick//3)
       continue

it will draw the other objects in the image as well.

from tracking-with-darkflow.

arevel190 avatar arevel190 commented on May 18, 2024

@Bendidi Awesome, thanks. Also, is there a way to output in real time (via txt or csv file) the last ID number detected?

from tracking-with-darkflow.

obendidi avatar obendidi commented on May 18, 2024

here is the line where it writes to a csv each new box ID+ frame number + box coordinate in pixels

and as I've said here in one of my answers :

you can set the csv FLAG to true it will write at run time the ID number and the corresponding box in a csv file as mentioned in ReadMe :

csv : save csv file of detections in the format (frame_id,object_id,x,y,w,h)

from tracking-with-darkflow.

arevel190 avatar arevel190 commented on May 18, 2024

@Bendidi Thanks again for your prompt reply. I tested this solution, but the csv table is only populated after the program has been stopped. I meant to output real time data, like a stream of values or a csv file that is constantly being populated by the new IDs.

from tracking-with-darkflow.

obendidi avatar obendidi commented on May 18, 2024

it should be fixed with the last commit πŸ‘

from tracking-with-darkflow.

arevel190 avatar arevel190 commented on May 18, 2024

@Bendidi For some reason after your update I am getting a 404 error on the github repo (the darkflow folder to be specific), and it is not updating. Once again thank you very much!

from tracking-with-darkflow.

arevel190 avatar arevel190 commented on May 18, 2024

I just double checked and the folder is up again. Now there is another error that is being generated:

Traceback (most recent call last):
File "run.py", line 3, in
from darkflow.darkflow.net.build import TFNet
File "/Users/pedareva1/Tracking-with-darkflow/darkflow/darkflow/net/build.py", line 7, in
from .framework import create_framework
File "/Users/pedareva1/Tracking-with-darkflow/darkflow/darkflow/net/framework.py", line 2, in
from . import yolov2
File "/Users/pedareva1/Tracking-with-darkflow/darkflow/darkflow/net/yolov2/init.py", line 2, in
from . import predict
File "/Users/pedareva1/Tracking-with-darkflow/darkflow/darkflow/net/yolov2/predict.py", line 134
csv_file.flush()
^
TabError: inconsistent use of tabs and spaces in indentation

(Sorry for asking too many questions).

from tracking-with-darkflow.

arevel190 avatar arevel190 commented on May 18, 2024

I just checked and could solve the error by converting indentation to spaces. Now another error pops up:

Traceback (most recent call last):
File "run.py", line 27, in
tfnet.camera()
File "/home/pedareva1/Tracking-with-darkflow/darkflow/darkflow/net/help.py", line 107, in camera
writer.writerow(['frame_id', 'track_id' , 'x', 'y', 'w', 'h'])
TypeError: a bytes-like object is required, not 'str'

I would really appreciate your help with this.

from tracking-with-darkflow.

obendidi avatar obendidi commented on May 18, 2024

in line 106 of darkflow/darkflow/net/help.py , just change the 'wb' to 'w' , I'll make the change in the repo later

It's a problem that happens when using python 3 , when I tested last time it was with python 2 ^^

from tracking-with-darkflow.

arevel190 avatar arevel190 commented on May 18, 2024

@Bendidi Awesome, thanks a lot!

from tracking-with-darkflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.