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

error #26

Open
feng-yun-anhui opened this issue Jul 15, 2020 · 15 comments
Open

error #26

feng-yun-anhui opened this issue Jul 15, 2020 · 15 comments

Comments

@feng-yun-anhui
Copy link

from config import TF_MODELS_PATH
ImportError: cannot import name 'TF_MODELS_PATH' from 'config' (D:\python3.7\lib\site-packages\config_init_.py)

what's the mean of TF_MODELS_PATH? I can't find it in config,should I create it by myself? @fengyang0317 can you help me?

@fengyang0317
Copy link
Owner

Path to https://github.com/tensorflow/models

@feng-yun-anhui
Copy link
Author

I‘m sorry to bother you, can you explain it in more detail? How to use the link you provided ?

@feng-yun-anhui
Copy link
Author

link.
Failed to open,can you have other ways to download the dataset? Thank you very much.

@fengyang0317
Copy link
Owner

链接: https://pan.baidu.com/s/1m-p7aTF0L_mFzPMdKK7btw 提取码: nzqq

@feng-yun-anhui
Copy link
Author

$ python preprocessing/crawl_descriptions.py
person 1000
0 []
bicycle 1000
0 []
car 1000
0 []
motorbike 1000
0 []
aeroplane 1000
0 []
...
Is this result normal? How to solve it?Looking forward to your reply.

@fengyang0317
Copy link
Owner

I will not maintain the crawl_descriptions.py file. You need to change it according to the Shutterstock website.

@feng-yun-anhui
Copy link
Author

from config import TF_MODELS_PATH
ImportError: cannot import name 'TF_MODELS_PATH' from 'config' (D:\python3.7\lib\site-packages\config_init_.py)

what's the mean of TF_MODELS_PATH? I can't find it in config,should I create it by myself?
I still haven't solved this problem, can you explain it in more detail.Thank you.

@fengyang0317
Copy link
Owner

@ironmanx1
Copy link

$ python preprocessing/crawl_descriptions.py
person 1000
0 []
bicycle 1000
0 []
car 1000
0 []
motorbike 1000
0 []
aeroplane 1000
0 []
...
Is this result normal? How to solve it?Looking forward to your reply.

sorry to bother you,i also get the same results in this step,but i don't know change which part in crawl_descriptions.py file.Can you help me?thank you~

@feng-yun-anhui
Copy link
Author

feng-yun-anhui commented Aug 12, 2021 via email

@fengyang0317
Copy link
Owner

model_name = 'faster_rcnn_inception_resnet_v2_atrous_oid_2018_01_28' path_to_ckpt = (TF_MODELS_PATH + '/research/object_detection/' + model_name + '/frozen_inference_graph.pb'tensorflow.python.framework.errors_impl.NotFoundError: /home/fy/PycharmProjects/unsupervised_captioning-master/workspace/tf_models/research/object_detection/faster_rcnn_inception_resnet_v2_atrous_oid_2018_01_28/frozen_inference_graph.pb; No such file or directory how to solve the problem? Looking forward to your reply.

------------------ 原始邮件 ------------------ 发件人: "fengyang0317/unsupervised_captioning" @.>; 发送时间: 2020年8月16日(星期天) 上午6:02 @.>; 抄送: "F @.@.>; 主题: Re: [fengyang0317/unsupervised_captioning] error (#26) You should read the code at https://github.com/fengyang0317/unsupervised_captioning/blob/master/config.py — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

You need to download the model in https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf1_detection_zoo.md

@feng-yun-anhui
Copy link
Author

File "/home/fy/PycharmProjects/unsupervised_captioning-master/im_caption_full.py", line 33, in
from nets import inception_v4
File "/home/fy/anaconda3/envs/caption/lib/python3.6/site-packages/slim-0.1-py3.6.egg/nets/inception_v4.py", line 28, in
File "/home/fy/anaconda3/envs/caption/lib/python3.6/site-packages/tf_slim-1.1.0-py3.6.egg/tf_slim/init.py", line 25, in
from tf_slim.layers import *
File "/home/fy/anaconda3/envs/caption/lib/python3.6/site-packages/tf_slim-1.1.0-py3.6.egg/tf_slim/layers/init.py", line 25, in
from tf_slim.layers.layers import *
File "/home/fy/anaconda3/envs/caption/lib/python3.6/site-packages/tf_slim-1.1.0-py3.6.egg/tf_slim/layers/layers.py", line 30, in
from tf_slim.ops import variables
File "/home/fy/anaconda3/envs/caption/lib/python3.6/site-packages/tf_slim-1.1.0-py3.6.egg/tf_slim/ops/variables.py", line 27, in
from tensorflow.python.framework import device_spec as tf_device
ImportError: cannot import name 'device_spec'

how to solve the problem? Looking forward to your reply.

@fengyang0317
Copy link
Owner

The following is a working conda environment. You create a yml file with the following content and then create a conda environment using the yml.

name: caption2
channels:
  - defaults
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=4.5=1_gnu
  - _tflow_select=2.1.0=gpu
  - absl-py=0.11.0=pyhd3eb1b0_1
  - astor=0.8.0=py27_0
  - backports=1.0=pyhd3eb1b0_2
  - backports.shutil_get_terminal_size=1.0.0=pyhd3eb1b0_3
  - backports.weakref=1.0.post1=py_1
  - blas=1.0=mkl
  - c-ares=1.17.1=h27cfd23_0
  - ca-certificates=2021.5.25=h06a4308_1
  - certifi=2020.6.20=pyhd3eb1b0_3
  - cudatoolkit=10.0.130=0
  - cudnn=7.6.5=cuda10.0_0
  - cupti=10.0.130=0
  - decorator=4.4.2=pyhd3eb1b0_0
  - enum34=1.1.6=py27_1
  - funcsigs=1.0.2=py27_0
  - future=0.18.2=py27_0
  - futures=3.3.0=py27_0
  - google-pasta=0.2.0=py_0
  - grpcio=1.27.2=py27hf8bcb03_0
  - h5py=2.9.0=py27h7918eee_0
  - hdf5=1.10.4=hb1b8bf9_0
  - intel-openmp=2021.2.0=h06a4308_610
  - ipython=5.8.0=py27_0
  - ipython_genutils=0.2.0=pyhd3eb1b0_1
  - keras-applications=1.0.8=py_1
  - keras-preprocessing=1.1.0=py_1
  - libffi=3.3=he6710b0_2
  - libgcc-ng=9.3.0=h5101ec6_17
  - libgfortran-ng=7.5.0=ha8ba4b0_17
  - libgfortran4=7.5.0=ha8ba4b0_17
  - libgomp=9.3.0=h5101ec6_17
  - libprotobuf=3.11.2=hd408876_0
  - libstdcxx-ng=9.3.0=hd4cf53a_17
  - linecache2=1.0.0=py_1
  - markdown=3.1.1=py27_0
  - mkl=2020.2=256
  - mkl-service=2.3.0=py27he904b0f_0
  - mkl_fft=1.0.15=py27ha843d7b_0
  - mkl_random=1.1.0=py27hd6b4f25_0
  - mock=2.0.0=py27_0
  - ncurses=6.2=he6710b0_1
  - nltk=3.4.5=py27_0
  - numpy=1.16.6=py27hbc911f0_0
  - numpy-base=1.16.6=py27hde5b4d6_0
  - openssl=1.1.1k=h27cfd23_0
  - opt_einsum=2.3.2=py_0
  - pathlib2=2.3.5=py27_0
  - pbr=5.5.1=py_0
  - pexpect=4.8.0=pyhd3eb1b0_3
  - pickleshare=0.7.5=py27_0
  - pip=19.3.1=py27_0
  - prompt_toolkit=1.0.15=py27_0
  - protobuf=3.11.2=py27he6710b0_0
  - ptyprocess=0.7.0=pyhd3eb1b0_2
  - pygments=2.5.2=py_0
  - python=2.7.18=ha1903f6_2
  - readline=8.1=h27cfd23_0
  - scandir=1.10.0=py27h7b6447c_0
  - scipy=1.2.1=py27h7c811a0_0
  - setuptools=44.0.0=py27_0
  - simplegeneric=0.8.1=py27_2
  - singledispatch=3.6.1=pyhd3eb1b0_1001
  - six=1.16.0=pyhd3eb1b0_0
  - sqlite=3.35.4=hdfb4753_0
  - tensorboard=1.15.0=py27hb230dea_0
  - tensorflow=1.15.0=gpu_py27h0c9f15b_0
  - tensorflow-base=1.15.0=gpu_py27hf473bbb_0
  - tensorflow-estimator=1.15.1=pyh2649769_0
  - tensorflow-gpu=1.15.0=h0d30ee6_0
  - termcolor=1.1.0=py27_1
  - tk=8.6.10=hbc83047_0
  - tqdm=4.59.0=pyhd3eb1b0_1
  - traceback2=1.4.0=py27_0
  - traitlets=4.3.3=py27_0
  - unittest2=1.1.0=py27_0
  - wcwidth=0.2.5=py_0
  - webencodings=0.5.1=py27_1
  - werkzeug=0.16.1=py_0
  - wheel=0.36.2=pyhd3eb1b0_0
  - wrapt=1.11.2=py27h7b6447c_0
  - zlib=1.2.11=h7b6447c_3
  - pip:
    - cloudpickle==1.1.1
    - dm-tree==0.1.5
    - gast==0.2.2
    - tensorflow-gan==1.0.0.dev0
    - tensorflow-probability==0.8.0
    - tf-slim==1.1.0
prefix: /opt/anaconda3/envs/caption2

@feng-yun-anhui
Copy link
Author

@fengyang0317
Copy link
Owner

Replace master with archive
https://github.com/tensorflow/models/tree/archive

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

3 participants