Ask Your Question
1

Where to place the pretrained data for GOTURN tracker

asked Jan 25 '17

00Zetti gravatar image

Hi,
following the documentation

//In order to use GOTURN tracker, GOTURN architecture goturn.prototxt and goturn.caffemodel are required to exist in root folder.

I have to put the pre trained caffemodel and the goturn.prototxt into the root folder, but which root? I've tried so far:

  • openCV src dir (github contrib repo/ + contrib/modules/tracking/+subfolders
  • opencv build dir(similar directories here)
  • opencv dirs in /usr/local/lib+include+bin
  • project src and project build

I am sure there is someone who successfully used it and can help me with this easy question :)

Preview: (hide)

Comments

You can see here the code to load the Caffe models. Have you tried to put the files in the same directory than the executable?

Eduardo gravatar imageEduardo (Jan 25 '17)edit

Yep, that's exactly what I tried :D Maybe there is more to do than just drop these two files? Or do I need to rebuild openCV with the fhe files instead of just placing them afterwards?

00Zetti gravatar image00Zetti (Jan 25 '17)edit

Where to place the pretrained data for GOTURN tracker in Android project? @nrparikh@00Zetti

rainY gravatar imagerainY (Jul 27 '18)edit

@rainY , please do not post answers here, if you have a question or comment, thank you.

berak gravatar imageberak (Jul 27 '18)edit

@berak OK, Do you know this question?

rainY gravatar imagerainY (Jul 27 '18)edit

it has to be in the same folder, where your program runs. where that is on android -- no idea.

berak gravatar imageberak (Jul 27 '18)edit

2 answers

Sort by » oldest newest most voted
2

answered Jan 28 '17

00Zetti gravatar image

updated Jan 30 '17

Ok problem solved :D
I could fix it by myself. Like suggested in the comment and what I've already tried - it was the right path. The problem was, that I didn't have the access rights for this folder, now it works fine.


So for others a simple tutorial how to get the files and where to place.

  • download and extract pre-trained data
  • copy them to /.../opencv_contrib-master/modules/tracking/src/
  • make sure you have access rights to this folder (e.g. sudo chmod -R on your opencv Folder)
Preview: (hide)

Comments

It's still not clear to me which in what directory should the caffemodel and the goturn.prototxt be placed? Should be the same directory as the generated executable or should be the source directory of opencv_contrib and then rebuild the opencv library?

mihaicl gravatar imagemihaicl (Apr 4 '17)edit
0

answered Aug 4 '17

nrparikh gravatar image

The method suggested by 00zetti is correct. If still facing issues, please ensure following points:

  • You have concatenated the zip files into single file named "goturn.caffemodel"
  • You need to paste both files i.e. "goturn.protoxt" and "goturn.caffemodel" in your working directory. You can check your working directory using getcwd() command.

Credits to LBerger.

Preview: (hide)

Question Tools

1 follower

Stats

Asked: Jan 25 '17

Seen: 5,092 times

Last updated: Jul 27 '18