0

Currently I am working with pycaffe and more specifically is working with faster rcnn library.

Faster rcnn has caffe-fast-rcnn caffe library.

I have a few caffe libraries built in my PC like original caffe library, its branch like apollocaffe .

But in my .bashrc file, I don't export any PYTHONPATH.

echo $PYTHONPATH does not produce anything on the console.

If I do import caffe at console

mypc@mypc-HP-Z420-Workstation:~/Softwares/Projects/py-faster-rcnn/tools$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import caffe
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named caffe
>>> 

That means I have no python caffe in the path.

When I run Demo.py inside tools folder in faster rcnn library, there is import caffe, how can I check which caffe is loaded for this import?

Then say, for this function call

net = caffe.Net(prototxt, caffemodel, caffe.TEST)

How can I trace which file is called for this function call in Python?

Is there a way to trace APIs call from one file to another file in Python? I used pdb, but control S doesn't make to jump to next file if the API is from library.

batuman
  • 7,066
  • 26
  • 107
  • 229
  • 1
    @Shai, this isn't the only question here. In addition, in faster-RCNN case, there is a useful information here - the path is inserted explicitly in https://github.com/rbgirshick/py-faster-rcnn/blob/master/tools/_init_paths.py. – rkellerm Nov 21 '17 at 07:36
  • @rkellerm they have separate file for the library. – batuman Nov 21 '17 at 07:51

0 Answers0