Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object Tracking #2

Closed
arevel190 opened this issue Aug 9, 2017 · 11 comments
Closed

Object Tracking #2

arevel190 opened this issue Aug 9, 2017 · 11 comments

Comments

@arevel190
Copy link

Hi,

I wanted to know if there is a clear path / tutorial that I could follow to train deep sort on detecting my own categories, like logos or objects?

Thanks a lot for your help :)

@obendidi
Copy link
Owner

obendidi commented Aug 9, 2017

the training code is not yet published by the authors of deep_sort, you can find more information here and here

EDIT :
Alternatively you can use sort for the object tracking, it's not as accurate as deep_sort , but it should do the trick, I will be adding it to the repo some time soon

@arevel190
Copy link
Author

arevel190 commented Aug 9, 2017

@Bendidi I'll have a look into Sort. Also, is there a way to output the ID number to a txt file or print it?

Once again thank you for your help!

@obendidi
Copy link
Owner

obendidi commented Aug 9, 2017

you can set the csv FLAG to true it will write at run time the ID number ans 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)

@obendidi
Copy link
Owner

I've added sort to the project , you can test it by setting FLAGS.tracker = "sort" and changing FLAGS.trackObj = "people" to the object you want to track

@arevel190
Copy link
Author

@Bendidi I just used the code you provided and now I am getting the following error:

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 3, in
from . import help
File "/Users/pedareva1/Tracking-with-darkflow/darkflow/darkflow/net/help.py", line 68
def camera(self):
^
SyntaxError: import * only allowed at module level

I really appreciate your help.

@obendidi
Copy link
Owner

@arevel190 it should be working now ! Tested on my machine with python2 & 3 , and i had no problem

@arevel190
Copy link
Author

@Bendidi Hi, I tried reinstalling your git but now when I initialize all submodules I get the following error:

Submodule 'darkflow' (https://github.com/bendidi/darkflow) registered for path 'darkflow'
Submodule 'deep_sort' (https://github.com/bendidi/deep_sort.git) registered for path 'deep_sort'
Submodule 'sort' (https://github.com/bendidi/sort.git) registered for path 'sort'
Cloning into '/Users/pedareva1/Tracking-with-darkflow/darkflow'...
Cloning into '/Users/pedareva1/Tracking-with-darkflow/deep_sort'...
Cloning into '/Users/pedareva1/Tracking-with-darkflow/sort'...
error: Server does not allow request for unadvertised object 225c4eb02a10caa375d2f76c185a34750a57fa61
Fetched in submodule path 'darkflow', but it did not contain 225c4eb02a10caa375d2f76c185a34750a57fa61. Direct fetching of that commit failed.

Once again, thank you very much for your constant help.

@obendidi
Copy link
Owner

it should propably work now, I've removed darkflow and re-added it so there shouldn't be a problem(Althrough I still don't understand why it wasn't working in the first place )

@arevel190
Copy link
Author

@Bendidi I just tested it again and it is working fine when I use deep_sort. But when I use sort I get this error:

_Traceback (most recent call last):
File "run.py", line 27, in
tfnet.camera()
File "/Users/pedareva1/Tracking-with-darkflow/darkflow/darkflow/net/help.py", line 83, in camera
from sort.sort import Sort
File "/Users/pedareva1/Tracking-with-darkflow/sort/sort.py", line 23, in
import matplotlib.pyplot as plt
File "/Users/pedareva1/envs/cv2/lib/python3.6/site-packages/matplotlib/pyplot.py", line 115, in
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/Users/pedareva1/envs/cv2/lib/python3.6/site-packages/matplotlib/backends/init.py", line 32, in pylab_setup
globals(),locals(),[backend_name],0)
File "/Users/pedareva1/envs/cv2/lib/python3.6/site-packages/matplotlib/backends/backend_macosx.py", line 19, in
from matplotlib.backends import macosx
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.

Thanks a lot for your help.

@obendidi
Copy link
Owner

obendidi commented Aug 10, 2017

I can't really help in this case as this an error specific for python in Mac OS, you can start with doing what they said :

´please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.´

@arevel190
Copy link
Author

@Bendidi Sounds good. I will try to test it on a Windows and Linux Machine to see how it goes. Thanks a lot for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants