chainer / chainercv

ChainerCV: a Library for Deep Learning in Computer Vision

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no module named 'chainercv.datasets'

dojinkimm opened this issue · comments

Hi I am currently using example from this repo
chainercv/examples/faster_rcnn/demo.py
I have installed chainer 6.1.0 and chainercv 0.13.1

When I run this code following error occurs
ModuleNotFoundError: No module named 'chainercv.datasets'; 'chainercv' is not a package

I found that datasets are in chainer but I still could not find voc_bbox_label_names, FasterRCNNVGG16, vis_bbox

how can I fix it?

can you paste result of pip freeze | grep chainercv?
if there is no output, chainercv is not installed so you need to install chainercv with command pip install chainercv (if you want to install in your system, you need sudo).

스크린샷 2019-07-05 오후 3 10 40

chainercv is installed its version is 0.13.1

There is chainer.datasets but no voc_bbox_label_names or fasterRCNNVGG16
스크린샷 2019-07-05 오후 3 12 00

voc_bbox_label_names is in chainercv.datasets not chainer.datasets.
FasterRCNNVGG16 is also in chainercv.links.

Yes I just wondered because I could not find chainercv.datasets and chainercv.links

This is the error that I receive. I did not mention above but I am using Mac OS X and I realized that it is not officially supported OS. Is this a reason for this error?

  ''')  # NOQA
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2963, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-2-f9d0a92cf12d>", line 1, in <module>
    runfile('/Users/dojinkim/Desktop/Project/python_opencv/chainercv.py', wdir='/Users/dojinkim/Desktop/Project/python_opencv')
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_umd.py", line 198, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/Users/dojinkim/Desktop/Project/python_opencv/chainercv.py", line 5, in <module>
    from chainercv.datasets import voc_bbox_label_names
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "/Users/dojinkim/Desktop/Project/python_opencv/chainercv.py", line 5, in <module>
    from chainercv.datasets import voc_bbox_label_names
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'chainercv.datasets'; 'chainercv' is not a package```

Please reinstall chainercv.

sudo pip uninstall chainercv
sudo pip install chainercv
python -c "import chainercv"

No reply, so close this issue.