Git Product home page Git Product logo

Comments (4)

vinay0410 avatar vinay0410 commented on July 2, 2024

I would like to add that list of bounding boxes, detection scores, etc are returned in the form of numpy.ndarray by tensorflow, so inorder to read that in C++, we might have to use numpy's c api also which has ArrayObject available for this purpose.

from detectionmetrics.

chanfr avatar chanfr commented on July 2, 2024

Hi @vinay0410 ,
the video looks awesome, great job!

I'm having some troubles to make your code work, I'm getting the following error when trying to use the tensorflow backend:


returned tensorflow
in tensorflow constructor
InterPreter Initailized
Loading Detection Graph
Traceback (most recent call last):
File "/home/frivas/devel/gsoc2018/dl-DetectionSuite/DeepLearningSuite/DeepLearningSuiteLib/python_modules/tensorflow_detect.py", line 2, in
import tensorflow as tf
File "/usr/local/lib/python2.7/dist-packages/tensorflow/init.py", line 24, in
from tensorflow.python import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/init.py", line 63, in
from tensorflow.python.framework.framework_lib import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/framework_lib.py", line 76, in
from tensorflow.python.framework.ops import Graph
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 37, in
from tensorflow.python.eager import context
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/eager/context.py", line 28, in
from tensorflow.python.platform import app
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 23, in
from tensorflow.python.platform import flags
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/flags.py", line 26, in
_global_parser = _argparse.ArgumentParser()
File "/usr/lib/python2.7/argparse.py", line 1586, in init
prog = _os.path.basename(_sys.argv[0])
AttributeError: 'module' object has no attribute 'argv'
Cannot find function "tensorflow_detect"
Detection Graph Loaded

my config:
echo $PYTHONPATH
/home/frivas/devel/dl-DetectionSuite/DeepLearningSuite/DeepLearningSuiteLib/python_modules/

Anything else that i'm missing?

I have some questions:

  1. Which python version should I use?
  2. I have to specify something in the "Net Configuration" box? or just a foo file?

cheers,

from detectionmetrics.

vinay0410 avatar vinay0410 commented on July 2, 2024

Hi @chanfr

Thanks for replying!
I have tested this in python 2.7.

Though, the error seems to be tensorflow import error. Which version of tensorflow are you using?
I have tested it in 1.5.0.
Also could please try importing tensorflow in terminal by typing python and then import tensorflow
See if this error occurs again.
Also, your PYTHONPATH is set to a different location as compared to the directory printed in stack trace here

Traceback (most recent call last):
File "/home/frivas/devel/gsoc2018/dl-DetectionSuite/DeepLearningSuite/DeepLearningSuiteLib/python_modules/tensorflow_detect.py", line 2, in 

Although, that shouldn't cause a problem , but changing that would certainly help in future.

Also, it is necessary to specify something in the Net Configuration, and that can be a foo file since it will not be used.

Cheers

from detectionmetrics.

vinay0410 avatar vinay0410 commented on July 2, 2024

Hi @chanfr,
I have added a commit which will probably fix your issue know, which was regarding importing tensorflow.
It seems as if tensorflow requires sys.argv, when being imported and while it is being called from C++, sys.argv is generally not set.
So, I have added an empty sys.argv.
Please try again and see if it fixes your issue.
I have tested it again on my computer and works great even after this minor alteration.
Also, do add your PYTHONPATH in the python_modules of the updated repository.

Also, I have referenced this fix from here

Thanks!!

from detectionmetrics.

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.