Closed agentmorris closed 1 year ago
Hi @tianxianhao, are you running this in the Colab notebook? Can you please show us a screenshot of the notebook's files, where megadetector_v4_1_0.pb
is located, and maybe print out the version of TensorFlow e.g. print(tf.__version__)
?
(Comment originally posted by yangsiyu007)
thanks for your reply. I run it in my local machine by jupyter notebook. Is it only work on Colab notebook?
(Comment originally posted by tianxianhao)
It can run locally, but you usually need to do more work to make sure the environment is set up correctly. Do you want to try follow our Installation section (https://github.com/microsoft/CameraTraps#installation)?
(Comment originally posted by yangsiyu007)
After re-install the environment following with your suggestion, I still got the same problem as before.
(Comment originally posted by tianxianhao)
TensorFlow version: 1.13.1
2020-10-30 02:00:31.354796: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-10-30 02:00:33.846592: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x55e2fcbec730 executing computations on platform CUDA. Devices:
2020-10-30 02:00:33.846692: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): Tesla K80, Compute Capability 3.7
2020-10-30 02:00:33.846714: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (1): Tesla K80, Compute Capability 3.7
2020-10-30 02:00:33.846731: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (2): Tesla K80, Compute Capability 3.7
2020-10-30 02:00:33.846747: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (3): Tesla K80, Compute Capability 3.7
2020-10-30 02:00:33.846763: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (4): Tesla K80, Compute Capability 3.7
2020-10-30 02:00:33.846778: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (5): Tesla K80, Compute Capability 3.7
2020-10-30 02:00:33.846794: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (6): Tesla K80, Compute Capability 3.7
2020-10-30 02:00:33.846810: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (7): Tesla K80, Compute Capability 3.7
2020-10-30 02:00:33.861817: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2200020000 Hz
2020-10-30 02:00:33.868858: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x55e2fcd2f8b0 executing computations on platform Host. Devices:
2020-10-30 02:00:33.868940: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0):
2020-10-30 02:00:33.960390: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/device:GPU:0 with 10746 MB memory) -> physical GPU (device: 0, name: Tesla K80, pci bus id: 0000:86:00.0, compute capability: 3.7)
2020-10-30 02:00:33.960630: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/device:GPU:1 with 10746 MB memory) -> physical GPU (device: 1, name: Tesla K80, pci bus id: 0000:87:00.0, compute capability: 3.7)
2020-10-30 02:00:33.960854: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/device:GPU:2 with 10746 MB memory) -> physical GPU (device: 2, name: Tesla K80, pci bus id: 0000:8a:00.0, compute capability: 3.7)
2020-10-30 02:00:33.961092: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/device:GPU:3 with 10746 MB memory) -> physical GPU (device: 3, name: Tesla K80, pci bus id: 0000:8b:00.0, compute capability: 3.7)
2020-10-30 02:00:33.961315: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/device:GPU:4 with 10746 MB memory) -> physical GPU (device: 4, name: Tesla K80, pci bus id: 0000:90:00.0, compute capability: 3.7)
2020-10-30 02:00:33.961502: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/device:GPU:5 with 10746 MB memory) -> physical GPU (device: 5, name: Tesla K80, pci bus id: 0000:91:00.0, compute capability: 3.7)
2020-10-30 02:00:33.961731: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/device:GPU:6 with 10746 MB memory) -> physical GPU (device: 6, name: Tesla K80, pci bus id: 0000:94:00.0, compute capability: 3.7)
2020-10-30 02:00:33.961968: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/device:GPU:7 with 10746 MB memory) -> physical GPU (device: 7, name: Tesla K80, pci bus id: 0000:95:00.0, compute capability: 3.7)
tf.test.is_gpu_available: True
3597 image files found in the input directory
TFDetector: Loading graph...
Traceback (most recent call last):
File "run_tf_detector_batch.py", line 375, in
(Comment originally posted by tianxianhao)
(cameratraps) [tianxianhao@localhost CameraTraps]$ conda list
#
_libgcc_mutex 0.1 main
absl-py 0.10.0 py36_0
adal 1.2.4 pypi_0 pypi
aiohttp 3.6.3 py36h7b6447c_0
applicationinsights 0.11.9 pypi_0 pypi
argon2-cffi 20.1.0 py36h7b6447c_1
astor 0.8.1 pypi_0 pypi
async-timeout 3.0.1 py36_0
async_generator 1.10 py36h28b3542_0
attrs 20.2.0 py_0
azure-common 1.1.25 pypi_0 pypi
azure-core 1.8.2 pypi_0 pypi
azure-cosmos 4.2.0 pypi_0 pypi
azure-graphrbac 0.61.1 pypi_0 pypi
azure-mgmt-authorization 0.61.0 pypi_0 pypi
azure-mgmt-containerregistry 2.8.0 pypi_0 pypi
azure-mgmt-core 1.2.1 pypi_0 pypi
azure-mgmt-keyvault 8.0.0 pypi_0 pypi
azure-mgmt-resource 15.0.0 pypi_0 pypi
azure-mgmt-storage 16.0.0 pypi_0 pypi
azure-storage-blob 12.5.0 pypi_0 pypi
azureml-automl-core 1.0.83.1 pypi_0 pypi
azureml-core 1.0.83 pypi_0 pypi
azureml-dataprep 1.1.38 pypi_0 pypi
azureml-dataprep-native 13.2.0 pypi_0 pypi
azureml-pipeline 1.0.83 pypi_0 pypi
azureml-pipeline-core 1.0.83 pypi_0 pypi
azureml-pipeline-steps 1.0.83 pypi_0 pypi
azureml-sdk 1.0.83 pypi_0 pypi
azureml-telemetry 1.0.83 pypi_0 pypi
azureml-tensorboard 1.0.83 pypi_0 pypi
azureml-train 1.0.83 pypi_0 pypi
azureml-train-automl-client 1.0.83 pypi_0 pypi
azureml-train-core 1.0.83 pypi_0 pypi
azureml-train-restclients-hyperdrive 1.0.83 pypi_0 pypi
backcall 0.2.0 py_0
backports-tempfile 1.0 pypi_0 pypi
backports-weakref 1.0.post1 pypi_0 pypi
blas 1.0 mkl
bleach 3.2.1 py_0
blinker 1.4 py36_0
brotlipy 0.7.0 py36h7b6447c_1000
c-ares 1.16.1 h7b6447c_0
ca-certificates 2020.10.14 0
cachetools 4.1.1 py_0
certifi 2020.6.20 py36_0
cffi 1.14.3 py36he30daa8_0
chardet 3.0.4 py36_1003
click 7.1.2 py_0
cloudpickle 1.6.0 py_0
configargparse 1.2.3 pypi_0 pypi
contextlib2 0.6.0.post1 pypi_0 pypi
cryptography 3.1.1 py36h1ba5d50_0
cycler 0.10.0 py36_0
cytoolz 0.11.0 py36h7b6447c_0
dask-core 2.30.0 py_0
dbus 1.13.18 hb2f20db_0
decorator 4.4.2 py_0
defusedxml 0.6.0 py_0
distro 1.5.0 pypi_0 pypi
docker 4.3.1 pypi_0 pypi
dotnetcore2 2.1.17 pypi_0 pypi
entrypoints 0.3 py36_0
et_xmlfile 1.0.1 py_1001
expat 2.2.10 he6710b0_2
flake8 3.7.9 pypi_0 pypi
flask 1.1.2 pypi_0 pypi
flask-basicauth 0.2.0 pypi_0 pypi
fontconfig 2.13.0 h9420a91_0
freetype 2.10.3 h5ab3b9f_0
fusepy 3.0.1 pypi_0 pypi
gast 0.4.0 pypi_0 pypi
gevent 20.9.0 pypi_0 pypi
geventhttpclient 1.4.4 pypi_0 pypi
glib 2.66.1 h92f7085_0
google-auth 1.22.1 py_0
google-auth-oauthlib 0.4.1 py_2
greenlet 0.4.17 pypi_0 pypi
grpcio 1.31.0 py36hf8bcb03_0
gst-plugins-base 1.14.0 hbbd80ab_1
gstreamer 1.14.0 hb31296c_0
h5py 2.10.0 pypi_0 pypi
humanfriendly 8.2 py36_0
icu 58.2 he6710b0_3
idna 2.10 py_0
idna_ssl 1.1.0 py36_0
imageio 2.9.0 py_0
importlib-metadata 2.0.0 py_1
importlib_metadata 2.0.0 1
intel-openmp 2020.2 254
ipykernel 5.3.4 py36h5ca1d4c_0
ipython 7.16.1 py36h5ca1d4c_0
ipython_genutils 0.2.0 py36_0
isodate 0.6.0 pypi_0 pypi
itsdangerous 1.1.0 pypi_0 pypi
jdcal 1.4.1 py_0
jedi 0.17.2 py36_0
jeepney 0.4.3 pypi_0 pypi
jinja2 2.11.2 py_0
jmespath 0.10.0 pypi_0 pypi
joblib 0.17.0 py_0
jpeg 9b h024ee3a_2
jsonpickle 1.4.1 py_0
jsonschema 3.2.0 py_2
jupyter_client 6.1.7 py_0
jupyter_core 4.6.3 py36_0
jupyterlab_pygments 0.1.2 py_0
keras-applications 1.0.8 pypi_0 pypi
keras-preprocessing 1.1.2 pypi_0 pypi
kiwisolver 1.2.0 py36hfd86e86_0
lcms2 2.11 h396b838_0
ld_impl_linux-64 2.33.1 h53a641e_7
libedit 3.1.20191231 h14c3975_1
libffi 3.3 he6710b0_2
libgcc-ng 9.1.0 hdf63c60_0
libgfortran-ng 7.3.0 hdf63c60_0
libpng 1.6.37 hbc83047_0
libprotobuf 3.13.0.1 hd408876_0
libsodium 1.0.18 h7b6447c_0
libstdcxx-ng 9.1.0 hdf63c60_0
libtiff 4.1.0 h2733197_1
libuuid 1.0.3 h1bed415_2
libxcb 1.14 h7b6447c_0
libxml2 2.9.10 he19cac6_1
locust 1.3.1 pypi_0 pypi
lz4-c 1.9.2 heb0550a_3
markdown 3.3.1 py36_0
markupsafe 1.1.1 py36h7b6447c_0
matplotlib 3.3.1 0
matplotlib-base 3.3.1 py36h817c723_0
mccabe 0.6.1 pypi_0 pypi
mistune 0.8.4 py36h7b6447c_0
mkl 2020.2 256
mkl-service 2.3.0 py36he904b0f_0
mkl_fft 1.2.0 py36h23d657b_0
mkl_random 1.1.1 py36h0573a6f_0
mock 4.0.2 pypi_0 pypi
msgpack 1.0.0 pypi_0 pypi
msrest 0.6.19 pypi_0 pypi
msrestazure 0.6.4 pypi_0 pypi
multidict 4.7.6 py36h7b6447c_1
nb_conda_kernels 2.3.0 py36_0
nbclient 0.5.1 py_0
nbconvert 6.0.7 py36_0
nbformat 5.0.8 py_0
ncurses 6.2 he6710b0_1
ndg-httpsclient 0.5.1 pypi_0 pypi
nest-asyncio 1.4.1 py_0
networkx 2.5 py_0
notebook 6.1.4 py36_0
numpy 1.19.1 py36hbc911f0_0
numpy-base 1.19.1 py36hfa32c7d_0
oauthlib 3.1.0 py_0
olefile 0.46 py36_0
openpyxl 3.0.5 py_0
openssl 1.1.1h h7b6447c_0
packaging 20.4 py_0
pandas 1.1.3 py36he6710b0_0
pandoc 2.11 hb0f4dca_0
pandocfilters 1.4.2 py36_1
parso 0.7.0 py_0
pathspec 0.8.0 pypi_0 pypi
pcre 8.44 he6710b0_0
pexpect 4.8.0 py36_0
pickleshare 0.7.5 py36_0
pillow 8.0.0 py36h9a89aac_0
pip 20.2.3 py36_0
prometheus_client 0.8.0 py_0
prompt-toolkit 3.0.8 py_0
protobuf 3.13.0.1 py36he6710b0_1
psutil 5.7.2 pypi_0 pypi
ptyprocess 0.6.0 py36_0
pyasn1 0.4.8 py_0
pyasn1-modules 0.2.8 py_0
pycodestyle 2.5.0 pypi_0 pypi
pycparser 2.20 py_2
pyflakes 2.1.1 pypi_0 pypi
pygments 2.7.1 py_0
pyjwt 1.7.1 py36_0
pyopenssl 19.1.0 py_1
pyparsing 2.4.7 py_0
pyqt 5.9.2 py36h05f1152_2
pyrsistent 0.17.3 py36h7b6447c_0
pysocks 1.7.1 py36_0
python 3.6.12 hcff3b4d_2
python-dateutil 2.8.1 py_0
pytz 2020.1 py_0
pywavelets 1.1.1 py36h7b6447c_2
pyyaml 5.3.1 py36h7b6447c_1
pyzmq 19.0.2 py36he6710b0_1
qt 5.9.7 h5867ecd_1
readline 8.0 h7b6447c_0
requests 2.24.0 py_0
requests-oauthlib 1.3.0 py_0
requests-toolbelt 0.9.1 pypi_0 pypi
rsa 4.6 py_0
ruamel-yaml 0.15.89 pypi_0 pypi
scikit-image 0.16.2 py36h0573a6f_0
scikit-learn 0.23.2 py36h0573a6f_0
scipy 1.5.2 py36h0b6359f_0
secretstorage 3.1.2 pypi_0 pypi
send2trash 1.5.0 py36_0
setuptools 50.3.0 py36hb0f4dca_1
sip 4.19.8 py36hf484d3e_0
six 1.15.0 py_0
sqlite 3.33.0 h62c20be_0
tensorboard 1.13.1 pypi_0 pypi
tensorboard-plugin-wit 1.6.0 py_0
tensorflow-estimator 1.13.0 pypi_0 pypi
tensorflow-gpu 1.13.1 pypi_0 pypi
termcolor 1.1.0 pypi_0 pypi
terminado 0.9.1 py36_0
testpath 0.4.4 py_0
threadpoolctl 2.1.0 pyh5ca1d4c_0
tk 8.6.10 hbc83047_0
toolz 0.11.1 py_0
tornado 6.0.4 py36h7b6447c_1
tqdm 4.19.9 py36_0
traitlets 4.3.3 py36_0
typing_extensions 3.7.4.3 py_0
unidecode 1.1.1 py_0
urllib3 1.25.10 py_0
wcwidth 0.2.5 py_0
webencodings 0.5.1 py36_1
websocket-client 0.57.0 pypi_0 pypi
werkzeug 1.0.1 py_0
wheel 0.35.1 py_0
xz 5.2.5 h7b6447c_0
yaml 0.2.5 h7b6447c_0
yarl 1.6.2 py36h7b6447c_0
zeromq 4.3.3 he6710b0_3
zipp 3.3.0 py_0
zlib 1.2.11 h7b6447c_3
zope-event 4.5.0 pypi_0 pypi
zope-interface 5.1.2 pypi_0 pypi
zstd 1.4.5 h9ceee32_0
(Comment originally posted by tianxianhao)
FWIW I can reproduce this error if I deliberately corrupt the model file... is there any chance something happened to the model (.pb) file during download? Can you confirm that megadetector_v4_1_0.pb is 245,590,501 bytes in size?
(Comment originally posted by agentmorris)
Closing this issue for lack of response to the previous question about model size; feel free to comment or to contact us at cameratraps@microsoft.com if you are able to verify the model size and have tried re-downloading.
(Comment originally posted by agentmorris)
hello, i got some errors when run your code when refering to the file of megadetector_colab.ipynb ########################## !python run_tf_detector_batch.py megadetector_v4_1_0.pb "$images_dir" "$output_file_path" --recursive
Then the error occurs, the messages are showed as follow: ... GPU:0 with 10672 MB memory) -> physical GPU (device: 0, name: Tesla K80, pci bus id: 0000:90:00.0, compute capability: 3.7) 2020-09-28 13:04:05.656622: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/device:GPU:1 with 10672 MB memory) -> physical GPU (device: 1, name: Tesla K80, pci bus id: 0000:91:00.0, compute capability: 3.7) 2020-09-28 13:04:05.657306: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/device:GPU:2 with 10672 MB memory) -> physical GPU (device: 2, name: Tesla K80, pci bus id: 0000:94:00.0, compute capability: 3.7) 2020-09-28 13:04:05.657562: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/device:GPU:3 with 10672 MB memory) -> physical GPU (device: 3, name: Tesla K80, pci bus id: 0000:95:00.0, compute capability: 3.7) tf.test.is_gpu_available: True 3597 image files found in the input directory TFDetector: Loading graph... Traceback (most recent call last): File "run_tf_detector_batch.py", line 375, in
main()
File "run_tf_detector_batch.py", line 357, in main
n_cores=args.ncores)
File "run_tf_detector_batch.py", line 166, in load_and_run_detector_batch
tf_detector = TFDetector(model_file)
File "/data1/user_datas/tianxianhao/DeepLearning/CameraTrap/CameraTraps/detection/run_tf_detector.py", line 147, in init
detection_graph = TFDetector.__load_model(model_path)
File "/data1/user_datas/tianxianhao/DeepLearning/CameraTrap/CameraTraps/detection/run_tf_detector.py", line 212, in __load_model
od_graph_def.ParseFromString(serialized_graph)
google.protobuf.message.DecodeError: Error parsing message
###################
how to solve this problem? please.
Issue cloned from Microsoft/CameraTraps, original issue posted by tianxianhao on Sep 28, 2020.