bubbliiiing / faster-rcnn-tf2 Goto Github PK
View Code? Open in Web Editor NEW这是一个faster-rcnn的tensorflow2实现的库,可以利用voc数据集格式的数据进行训练。
License: MIT License
这是一个faster-rcnn的tensorflow2实现的库,可以利用voc数据集格式的数据进行训练。
License: MIT License
keras.backend has no attribute 'image_dim_ordering'以及‘get_session’,所以想请问一下keras的版本号
Starting training
Epoch 1/100
2020-12-09 08:09:15.487598: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7
2020-12-09 08:09:19.806001: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10
Traceback (most recent call last):
File "./faster-rcnn-tf2/train.py", line 167, in <module>
loss_class = model_classifier.train_on_batch([X, X2[:, sel_samples, :]], [Y1[:, sel_samples, :], Y2[:, sel_samples, :]])
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py", line 1695, in train_on_batch
logs = train_function(iterator)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/def_function.py", line 780, in __call__
result = self._call(*args, **kwds)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/def_function.py", line 823, in _call
self._initialize(args, kwds, add_initializers_to=initializers)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/def_function.py", line 697, in _initialize
*args, **kwds))
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/function.py", line 2855, in _get_concrete_function_internal_garbage_collected
graph_function, _, _ = self._maybe_define_function(args, kwargs)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/function.py", line 3213, in _maybe_define_function
graph_function = self._create_graph_function(args, kwargs)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/function.py", line 3075, in _create_graph_function
capture_by_value=self._capture_by_value),
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/func_graph.py", line 986, in func_graph_from_py_func
func_outputs = python_func(*func_args, **func_kwargs)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/def_function.py", line 600, in wrapped_fn
return weak_wrapped_fn().__wrapped__(*args, **kwds)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/func_graph.py", line 973, in wrapper
raise e.ag_error_metadata.to_exception(e)
TypeError: in user code:
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py:806 train_function *
return step_function(self, iterator)
/content/faster-rcnn-tf2/nets/frcnn_training.py:109 class_loss_cls *
return K.mean(K.categorical_crossentropy(y_true[0, :, :], y_pred[0, :, :]))
/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/dispatch.py:201 wrapper **
return target(*args, **kwargs)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/backend.py:4708 categorical_crossentropy
return -math_ops.reduce_sum(target * math_ops.log(output), axis)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/math_ops.py:1141 binary_op_wrapper
raise e
/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/math_ops.py:1125 binary_op_wrapper
return func(x, y, name=name)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/math_ops.py:1457 _mul_dispatch
return multiply(x, y, name=name)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/dispatch.py:201 wrapper
return target(*args, **kwargs)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/math_ops.py:509 multiply
return gen_math_ops.mul(x, y, name)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/gen_math_ops.py:6176 mul
"Mul", x=x, y=y, name=name)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_library.py:506 _apply_op_helper
inferred_from[input_arg.type_attr]))
TypeError: Input 'y' of 'Mul' Op has type float32 that does not match type int64 of argument 'x'.
在frcnn.py里面图像检测部分(detect_image)下面的裁剪(crop)步骤里面(179 line),对于裁剪边框坐标的赋值是不是有错误啊,如果没有错误的话还望请教一下作者
更新之后mAP为0 检测也没有效果
作者你好,训练一轮需要四十分钟左右这个正常吗?另外跑得过程中提示我RuntimeWarning: overflow encountered in exp
decode_bbox_height = np.exp(mbox_loc[:, 3] /4)。
AttributeError: 'Tensor' object has no attribute 'summary'
好像跟csdn上有所不同
原来数据集百度网盘失效了,作者可以重新发我一份吗,谢谢了!
tensorflow.python.framework.errors_impl.NotFoundError: Could not find valid device for node.
Node:{{node NonMaxSuppressionV3}}
All kernels registered for op NonMaxSuppressionV3 :
device='CPU'; T in [DT_FLOAT]
device='CPU'; T in [DT_HALF]
[Op:NonMaxSuppressionV3]
TypeError: Input 'y' of 'Mul' Op has type float32 that does not match type int32 of argument 'x'.
百度网盘中没有frcnn_weights.pth,那么如何直接做预测呢
faster-rcnn-tf2/utils/utils.py
Line 152 in b2383af
# 真实框距离先验框中心的xy轴偏移情况
decode_bbox_center_x = mbox_loc[:, 0] * prior_width / 4
decode_bbox_center_x += prior_center_x
decode_bbox_center_y = mbox_loc[:, 1] * prior_height / 4
decode_bbox_center_y += prior_center_y
# 真实框的宽与高的求取
decode_bbox_width = np.exp(mbox_loc[:, 2] / 4) # 此处为什么要乘以指数
decode_bbox_width *= prior_width
decode_bbox_height = np.exp(mbox_loc[:, 3] / 4) # 此处为什么要乘以指数
decode_bbox_height *= prior_height
如果可以需要修改哪里的代码呢?
我在训练钢筋数据时,loss一直为0。
更改的地方:num_classes = 2;
new_classes.txt里面是一个值;
训练出的loss为0,roi_loc=0。
Hey mate:) If I want to modify the input size to 300*300 should I modify the entire network or just modify the input?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.