gpt4 book ai didi

python - FileNotFoundError ("No such file: ' %s'"% fn) FileNotFoundError : No such file: (Mask_RCNN)

转载 作者:太空宇宙 更新时间:2023-11-03 19:45:52 28 4
gpt4 key购买 nike

尝试运行 mask_rcnn 的示例程序颜色飞溅并收到此错误:

我正在环境中的 anaconda 上运行 mrcnn 模型ma​​sknet,并安装了以下软件包。我已按照 https://github.com/matterport/Mask_RCNN/tree/master/samples/balloon 中的自述文件中给出的说明进行操作。或you could check the medium article which explains the tutorial

# Name                    Version                   Build  Channel
_tflow_select 2.1.0 gpu
absl-py 0.9.0 py37_0 conda-forge
astor 0.7.1 py_0 conda-forge
blas 1.0 mkl
ca-certificates 2019.11.28 hecc5488_0 conda-forge
certifi 2019.11.28 py37_0 conda-forge
cloudpickle 1.2.2 py_1 conda-forge
cudatoolkit 10.0.130 0 anaconda
cudnn 7.6.5 cuda10.0_0
cycler 0.10.0 py_2 conda-forge
cytoolz 0.10.1 py37hfa6e2cd_0 conda-forge
dask-core 2.10.1 py_0 conda-forge
decorator 4.4.1 py_0 conda-forge
freetype 2.10.0 h563cfd7_1 conda-forge
gast 0.2.2 py_0 conda-forge
google-pasta 0.1.8 py_0 conda-forge
grpcio 1.23.0 py37h3db2c7e_0 conda-forge
h5py 2.10.0 nompi_py37h422b98e_102 conda-forge
hdf5 1.10.5 nompi_ha405e13_1104 conda-forge
icc_rt 2019.0.0 h0cc432a_1
imageio 2.6.1 py37_0 conda-forge
intel-openmp 2020.0 166
jpeg 9c hfa6e2cd_1001 conda-forge
keras 2.2.4 py37_1 conda-forge
keras-applications 1.0.8 py_1 conda-forge
keras-base 2.2.4 py37_0
keras-gpu 2.2.4 0
keras-preprocessing 1.1.0 py_0 conda-forge
kiwisolver 1.1.0 py37he980bc4_0 conda-forge
libblas 3.8.0 14_mkl conda-forge
libcblas 3.8.0 14_mkl conda-forge
libgpuarray 0.7.6 hfa6e2cd_1003 conda-forge
liblapack 3.8.0 14_mkl conda-forge
libpng 1.6.37 h7602738_0 conda-forge
libprotobuf 3.11.3 h1a1b453_0 conda-forge
libtiff 4.1.0 h21b02b4_3 conda-forge
lz4-c 1.8.3 he025d50_1001 conda-forge
m2w64-gcc-libgfortran 5.3.0 6
m2w64-gcc-libs 5.3.0 7
m2w64-gcc-libs-core 5.3.0 7
m2w64-gmp 6.1.0 2
m2w64-libwinpthread-git 5.0.0.4634.697f757 2
mako 1.1.0 py_0 conda-forge
markdown 3.1.1 py_0 conda-forge
markupsafe 1.1.1 py37hfa6e2cd_0 conda-forge
matplotlib-base 3.1.3 py37h2981e6d_0 conda-forge
mkl 2019.4 245
mkl-service 2.3.0 py37hfa6e2cd_0 conda-forge
msys2-conda-epoch 20160418 1
networkx 2.4 py_0 conda-forge
numpy 1.18.1 py37hc71023c_0 conda-forge
olefile 0.46 py_0 conda-forge
openssl 1.1.1d hfa6e2cd_0 conda-forge
opt_einsum 3.1.0 py_0 conda-forge
pillow 7.0.0 py37h9ea1dd6_0 conda-forge
pip 20.0.2 py_2 conda-forge
protobuf 3.11.3 py37he025d50_0 conda-forge
pygpu 0.7.6 py37hc8d92b1_1000 conda-forge
pyparsing 2.4.6 py_0 conda-forge
pyreadline 2.1 py37_1001 conda-forge
python 3.7.6 h5b45d93_2 conda-forge
python-dateutil 2.8.1 py_0 conda-forge
pywavelets 1.1.1 py37hc8d92b1_0 conda-forge
pyyaml 5.3 py37hfa6e2cd_0 conda-forge
scikit-image 0.16.2 py37he350917_0 conda-forge
scipy 1.4.1 py37h9439919_0
setuptools 45.1.0 py37_0 conda-forge
six 1.14.0 py37_0 conda-forge
sqlite 3.30.1 hfa6e2cd_0 conda-forge
tensorboard 1.14.0 py37_0 conda-forge
tensorflow 1.14.0 gpu_py37h5512b17_0
tensorflow-base 1.14.0 gpu_py37h55fc52a_0
tensorflow-estimator 1.14.0 py37h5ca1d4c_0 conda-forge
tensorflow-gpu 1.14.0 h0d30ee6_0
termcolor 1.1.0 py_2 conda-forge
theano 1.0.4 py37h6538335_1001 conda-forge
tk 8.6.10 hfa6e2cd_0 conda-forge
toolz 0.10.0 py_0 conda-forge
tornado 6.0.3 py37hfa6e2cd_2 conda-forge
vc 14.1 h0510ff6_4
vs2015_runtime 14.16.27012 hf0eaf9b_1
vs2015_win-64 14.0.25420 h55c1224_11
werkzeug 0.16.1 py_0 conda-forge
wheel 0.34.2 py_1 conda-forge
wincertstore 0.2 py37_1003 conda-forge
wrapt 1.11.2 py37hfa6e2cd_0 conda-forge
xz 5.2.4 h2fa13f4_1001 conda-forge
yaml 0.2.2 hfa6e2cd_1 conda-forge
zlib 1.2.11 h2fa13f4_1006 conda-forge
zstd 1.4.4 hd8a0e53_1 conda-forge

This the link to the Mask_RCNN Github repo

(masknet) D:\Projects\Aidc\Mask_RCNN>python balloon.py splash --weights=D:\Projects\Aidc\Mask_RCNN\mask_rcnn_balloon.h5 --image=images.forbes.com_marshallshepherd_files_2018_05_img_launching_sonde_hilo_3
C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
Using TensorFlow backend.
WARNING:tensorflow:From C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\tensorflow\python\compat\v2_compat.py:61: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
Weights: D:\Projects\Aidc\Mask_RCNN\mask_rcnn_balloon.h5
Dataset: None
Logs: D:\Projects\logs

Configurations:
BACKBONE resnet101
BACKBONE_STRIDES [4, 8, 16, 32, 64]
BATCH_SIZE 1
BBOX_STD_DEV [0.1 0.1 0.2 0.2]
COMPUTE_BACKBONE_SHAPE None
DETECTION_MAX_INSTANCES 100
DETECTION_MIN_CONFIDENCE 0.9
DETECTION_NMS_THRESHOLD 0.3
FPN_CLASSIF_FC_LAYERS_SIZE 1024
GPU_COUNT 1
GRADIENT_CLIP_NORM 5.0
IMAGES_PER_GPU 1
IMAGE_CHANNEL_COUNT 3
IMAGE_MAX_DIM 1024
IMAGE_META_SIZE 14
IMAGE_MIN_DIM 800
IMAGE_MIN_SCALE 0
IMAGE_RESIZE_MODE square
IMAGE_SHAPE [1024 1024 3]
LEARNING_MOMENTUM 0.9
LEARNING_RATE 0.001
LOSS_WEIGHTS {'rpn_class_loss': 1.0, 'rpn_bbox_loss': 1.0, 'mrcnn_class_loss': 1.0, 'mrcnn_bbox_loss': 1.0, 'mrcnn_mask_loss': 1.0}
MASK_POOL_SIZE 14
MASK_SHAPE [28, 28]
MAX_GT_INSTANCES 100
MEAN_PIXEL [123.7 116.8 103.9]
MINI_MASK_SHAPE (56, 56)
NAME balloon
NUM_CLASSES 2
POOL_SIZE 7
POST_NMS_ROIS_INFERENCE 1000
POST_NMS_ROIS_TRAINING 2000
PRE_NMS_LIMIT 6000
ROI_POSITIVE_RATIO 0.33
RPN_ANCHOR_RATIOS [0.5, 1, 2]
RPN_ANCHOR_SCALES (32, 64, 128, 256, 512)
RPN_ANCHOR_STRIDE 1
RPN_BBOX_STD_DEV [0.1 0.1 0.2 0.2]
RPN_NMS_THRESHOLD 0.7
RPN_TRAIN_ANCHORS_PER_IMAGE 256
STEPS_PER_EPOCH 100
TOP_DOWN_PYRAMID_SIZE 256
TRAIN_BN False
TRAIN_ROIS_PER_IMAGE 200
USE_MINI_MASK True
USE_RPN_ROIS True
VALIDATION_STEPS 50
WEIGHT_DECAY 0.0001


WARNING:tensorflow:From D:\Projects\Aidc\Mask_RCNN\mrcnn\model.py:341: The name tf.log is deprecated. Please use tf.math.log instead.

WARNING:tensorflow:From D:\Projects\Aidc\Mask_RCNN\mrcnn\model.py:399: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
WARNING:tensorflow:From D:\Projects\Aidc\Mask_RCNN\mrcnn\model.py:423: calling crop_and_resize_v1 (from tensorflow.python.ops.image_ops_impl) with box_ind is deprecated and will be removed in a future version.
Instructions for updating:
box_ind is deprecated, use box_indices instead
WARNING:tensorflow:From D:\Projects\Aidc\Mask_RCNN\mrcnn\model.py:720: The name tf.sets.set_intersection is deprecated. Please use tf.sets.intersection instead.

WARNING:tensorflow:From D:\Projects\Aidc\Mask_RCNN\mrcnn\model.py:722: The name tf.sparse_tensor_to_dense is deprecated. Please use tf.sparse.to_dense instead.

WARNING:tensorflow:From D:\Projects\Aidc\Mask_RCNN\mrcnn\model.py:772: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.cast` instead.
Loading weights D:\Projects\Aidc\Mask_RCNN\mask_rcnn_balloon.h5
2020-02-09 23:48:46.212184: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
2020-02-09 23:48:46.218753: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library nvcuda.dll
2020-02-09 23:48:46.671920: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:
name: GeForce 940MX major: 5 minor: 0 memoryClockRate(GHz): 1.189
pciBusID: 0000:01:00.0
2020-02-09 23:48:46.678436: I tensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25] GPU libraries are statically linked, skip dlopen check.
2020-02-09 23:48:46.685177: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0
2020-02-09 23:48:47.849866: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-02-09 23:48:47.854705: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187] 0
2020-02-09 23:48:47.860509: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 0: N
2020-02-09 23:48:47.865251: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1391 MB memory) -> physical GPU (device: 0, name: GeForce 940MX, pci bus id: 0000:01:00.0, compute capability: 5.0)
Running on images.forbes.com_marshallshepherd_files_2018_05_img_launching_sonde_hilo_3
Traceback (most recent call last):
File "balloon.py", line 367, in <module>
video_path=args.video)
File "balloon.py", line 230, in detect_and_color_splash
image = skimage.io.imread(args.image)
File "C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\skimage\io\_io.py", line 48, in imread
img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
File "C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\skimage\io\manage_plugins.py", line 210, in call_plugin
return func(*args, **kwargs)
File "C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\skimage\io\_plugins\imageio_plugin.py", line 10, in imread
return np.asarray(imageio_imread(*args, **kwargs))
File "C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\imageio\core\functions.py", line 264, in imread
reader = read(uri, format, "i", **kwargs)
File "C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\imageio\core\functions.py", line 173, in get_reader
request = Request(uri, "r" + mode, **kwargs)
File "C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\imageio\core\request.py", line 126, in __init__
self._parse_uri(uri)
File "C:\Users\jarvis\Anaconda3\envs\masknet\lib\site-packages\imageio\core\request.py", line 278, in _parse_uri
raise FileNotFoundError("No such file: '%s'" % fn)
FileNotFoundError: No such file: 'D:\Projects\Aidc\Mask_RCNN\images.forbes.com_marshallshepherd_files_2018_05_img_launching_sonde_hilo_3'

我已经检查过,图像文件是Mask_RCNN文件夹,我还更改了图像只是为了检查它是否有一些故障,但效果是一样的。

最佳答案

实际上是一位 friend 建议了答案

D:\Projects\Aidc\Mask_RCNN>python balloon.py splash --weights=D:\Projects\Aidc\Mask_RCNN\mask_rcnn_balloon.h5 --image=images.forbes.com_marshallshepherd_files_2018_05_img_launching_sonde_hilo_3

只需根据文件名添加 .jpg/.png 扩展名,并确保将位置放在单引号中,代码应类似于

D:\Projects\Aidc\Mask_RCNN>python balloon.py splash --weights=D:\Projects\Aidc\Mask_RCNN\mask_rcnn_balloon.h5 --image='images.forbes.com_marshallshepherd_files_2018_05_img_launching_sonde_hilo_3.jpg'

关于python - FileNotFoundError ("No such file: ' %s'"% fn) FileNotFoundError : No such file: (Mask_RCNN),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60140420/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com