- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用 datitran( https://github.com/datitran/raccoon_dataset ) 的对象检测浣熊来训练我自己的数据集并遇到问题。
环境信息:
操作系统:Windows 10 64位
CUDA 和 CUDNN:CUDA 10/CUDNN 7.5.0
Tensorflow 版本:1.13.1(GPU)
Python 版本:3.7.0 64 位(Anaconda, Inc. on win32)
型号:ssd_mobilenet_v1_coco
问题:
我想开始训练
python model_main.py
--pipeline_config_path=Z:/Train/ssd_mobilenet_v1_coco_ship.config
--model_dir=Z:/Train/train
--alsologtostderr
遇到错误
Traceback (most recent call last):
File "model_main.py", line 26, in <module>
from object_detection import model_lib
File "D:\Anaconda\envs\tensorflow\Lib\models\research\object_detection\model_lib.py", line 27, in <module>
from object_detection import eval_util
File "D:\Anaconda\envs\tensorflow\Lib\models\research\object_detection\eval_util.py", line 27, in <module>
from object_detection.metrics import coco_evaluation
File "D:\Anaconda\envs\tensorflow\Lib\models\research\object_detection\metrics\coco_evaluation.py", line 20, in <module>
from object_detection.metrics import coco_tools
File "D:\Anaconda\envs\tensorflow\Lib\models\research\object_detection\metrics\coco_tools.py", line 47, in <module>
from pycocotools import coco
File "D:\Anaconda\envs\tensorflow\lib\site-packages\pycocotools\coco.py", line 56, in <module>
from . import mask as maskUtils
File "D:\Anaconda\envs\tensorflow\lib\site-packages\pycocotools\mask.py", line 3, in <module>
import pycocotools._mask as _mask
ImportError: DLL load failed: %1 is not a valid Win32 application.
此外,我还在~\research\object_detection\legacy
中尝试了旧版本命令train.py
python train.py
--logtostderr
--pipeline_config_path=Z:/Train/ssd_mobilenet_v1_coco_ship.config
--train_dir=Z:/Train/train
但它也失败了:
WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
* https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
* https://github.com/tensorflow/addons
If you depend on functionality not listed there, please file an issue.
WARNING:tensorflow:From D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py:125: main (from __main__) is deprecated and will be removed in a future version.
Instructions for updating:
Use object_detection/model_main.py.
WARNING:tensorflow:From D:\Anaconda\envs\tensorflow\Lib\models\research\object_detection\legacy\trainer.py:266: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.
Instructions for updating:
Please switch to tf.train.create_global_step
WARNING:tensorflow:From D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:num_readers has been reduced to 1 to match input file shards.
WARNING:tensorflow:From D:\Anaconda\envs\tensorflow\Lib\models\research\object_detection\builders\dataset_builder.py:80: parallel_interleave (from tensorflow.contrib.data.python.ops.interleave_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.data.experimental.parallel_interleave(...)`.
Traceback (most recent call last):
File "train.py", line 186, in <module>
tf.app.run()
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
_sys.exit(main(argv))
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\util\deprecation.py", line 324, in new_func
return func(*args, **kwargs)
File "train.py", line 182, in main
graph_hook_fn=graph_rewriter_fn)
File "D:\Anaconda\envs\tensorflow\Lib\models\research\object_detection\legacy\trainer.py", line 280, in train
train_config.prefetch_queue_capacity, data_augmentation_options)
File "D:\Anaconda\envs\tensorflow\Lib\models\research\object_detection\legacy\trainer.py", line 59, in create_input_queue
tensor_dict = create_tensor_dict_fn()
File "train.py", line 123, in get_next
dataset_builder.build(config)).get_next()
File "D:\Anaconda\envs\tensorflow\Lib\models\research\object_detection\builders\dataset_builder.py", line 134, in build
config.input_path[:], input_reader_config)
File "D:\Anaconda\envs\tensorflow\Lib\models\research\object_detection\builders\dataset_builder.py", line 80, in read_dataset
sloppy=config.shuffle))
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 1605, in apply
return DatasetV1Adapter(super(DatasetV1, self).apply(transformation_func))
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 1127, in apply
dataset = transformation_func(self)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\experimental\ops\interleave_ops.py", line 88, in _apply_fn
buffer_output_elements, prefetch_input_elements)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\readers.py", line 133, in __init__
cycle_length, block_length)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 2827, in __init__
super(InterleaveDataset, self).__init__(input_dataset, map_func)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 2798, in __init__
map_func, self._transformation_name(), dataset=input_dataset)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 2124, in __init__
self._function.add_to_graph(ops.get_default_graph())
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 490, in add_to_graph
self._create_definition_if_needed()
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 341, in _create_definition_if_needed
self._create_definition_if_needed_impl()
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 355, in _create_definition_if_needed_impl
whitelisted_stateful_ops=self._whitelisted_stateful_ops)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 883, in func_graph_from_py_func
outputs = func(*func_graph.inputs)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 2099, in tf_data_structured_function_wrapper
ret = func(*nested_args)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\readers.py", line 247, in __init__
filenames, compression_type, buffer_size, num_parallel_reads)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\readers.py", line 212, in __init__
self._impl = filenames.flat_map(read_one_file)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 1005, in flat_map
return FlatMapDataset(self, map_func)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 2798, in __init__
map_func, self._transformation_name(), dataset=input_dataset)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 2124, in __init__
self._function.add_to_graph(ops.get_default_graph())
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 490, in add_to_graph
self._create_definition_if_needed()
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 341, in _create_definition_if_needed
self._create_definition_if_needed_impl()
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 355, in _create_definition_if_needed_impl
whitelisted_stateful_ops=self._whitelisted_stateful_ops)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\function.py", line 883, in func_graph_from_py_func
outputs = func(*func_graph.inputs)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 2099, in tf_data_structured_function_wrapper
ret = func(*nested_args)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\readers.py", line 209, in read_one_file
return _TFRecordDataset(filename, compression_type, buffer_size)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\ops\readers.py", line 111, in __init__
argument_dtype=dtypes.string)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\data\util\convert.py", line 35, in optional_param_to_tensor
argument_default, dtype=argument_dtype, name=argument_name)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\constant_op.py", line 245, in constant
allow_broadcast=True)
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\constant_op.py", line 283, in _constant_impl
allow_broadcast=allow_broadcast))
File "D:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\tensor_util.py", line 501, in make_tensor_proto
(dtype, nparray.dtype, values))
TypeError: Incompatible types: <dtype: 'string'> vs. object. Value is
我应该怎么做才能使它们中的任何一个起作用?
最佳答案
您需要为 pycocotools 安装 VİSUAL C++ 2015,但是当我安装 Visual C++ 时,它无法工作。比我编辑 pycocotools 以使用等一下我正在加载它 github
编辑:加载https://github.com/rifatalptekincetin/pycocotools-edited
下载pycocotools文件夹替换到research/object_detection
文件路径必须是:
models-master/resarch/object_detection/pycocotools/__init__.py #etc.
关于python - 如何解决tensorflow 1.13.1和python 3.7中的 'import pycocotools._mask is not a valid win32 application'?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54947733/
当我尝试输入时,我正在关注 Ray Wenderlich ( https://videos.raywenderlich.com/screencasts/545-server-side-swift-wi
我正在使用 javax.validation.Validation 来验证 jpa 实体。我总是针对相同的实体进行验证。 我想知道是对所有验证使用一个 validator 更好,还是每次验证时实例化一
Controller : @RequestMapping(...) public void foo(@Valid Parent p){ } class Parent { @NotNull // j
在 login.phtml 中,validator 和 validate 之间有什么区别 - 有人可以解释下面每一行的含义 function onepageLogin(button)
我有一个 java bean 用于将 JSON 消息发送到 spring @RestController 并且我有 bean 验证设置并使用 @Valid 运行得很好。但我想转移到 Protobuf/
我正在使用 vee-validate 来验证注册表单,我编写了如下代码,
使用 有什么区别属性和 标签? 我应该什么时候使用哪一种? 最佳答案 validator属性允许您引用独立的托管 bean 方法,而不仅仅是像这样的验证器
我们有这个 Alamofire 错误处理: Alamofire.request(.GET, getUrl("mystuff")).responseData { response in guar
以下代码创建了两个单选按钮。每个选项都包含一个日期值,该日期值已成功转换为格式为“yyyy-MM-dd”的标签。一旦我做出选择并单击下一步按钮,我就会收到以下错误“j_idt12:comDateCho
是否有类似的验证: req.checkBody('property', 'should be present').isPresent(); 值本身并不重要。 现在我使用这个解决方案: .isLengt
系列文章: 1、async-validator 源码学习(一):文档翻译 2、async-validator 源码学习笔记(二):目录结构 3、async-validator 源码学习笔记(三):ru
我正在使用 Backbone.Validation插入。我有一个模型可以在服务器端进行唯一性检查。我如何让 backbone.validation 识别错误并运行我设置的回调以显示返回的错误消息? t
我有一个 Knockout.Validation 场景,我认为该场景相当普遍,但尚未通过在网络上搜索和本网站上的各种答案找到解决方案。 我正在验证的属性在 ajax 调用之后才会添加到可观察到的 kn
我是 Knockout JS 的新手。我需要一个验证器来验证用户将在文本框中输入的日期。为此编写了如下代码 ko.validation.rules['date'] = { validator:
如何在 JSF 验证器中比较两个字符串是否相等? if (!settingsBean.getNewPassword().equals(settingsBean.getConfirmPassword()
我有简单的域: package app class Customers { String CUSTOMER String NOTE static mapping = {
我正在使用 ember-validations 来验证表单中的模型。 如果我使用 createRecord 创建记录,则模型的实例已经过验证,因此在用户输入值之前表单已经显示验证错误。 我只想在提交表
我有两种不同的服务:第一个是将对象保存到数据库,第二个是更新现有对象。 我正在对我的对象使用验证约束,例如(@NotBlank、@Size、@Pattern 等),在第一种情况下,我需要验证对象的所有
我有 2 个 ensure - 验证装饰器用于 2 个字段:password 和 retypePassword。我想在填写 retypePassword 字段时检查这两个字段是否相等。 问题是,当我在
I'm aware that it's a bug ,但是在域类上调用 validate() 会覆盖之前放入的任何拒绝: def save = { def assignment = new A
我是一名优秀的程序员,十分优秀!