自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 SSD keras版本中的L2 Normalization

从网上下载下来的keras版本SSD代码中L2 Normalization报错,应该是keras版本的关系。因为这个自定义的L2 Normalization层也只是多学习一个参数,本身并不算难,于是打算自己直接重新写一下。这里直接用tf来写了,hhh。代码如下:def l2norm(x, scale, trainable=True, scope="L2Normalization"): n_channels = x.get_shape().as_list()[-1] l2_norm =

2020-06-06 14:28:55 1330

原创 利用CenterNet进行人脸检测和船只检测

CenterNet在CenterNet源码基础上来训练其他数据。本项目实现以下Face 人脸bbox+landmark检测SeaShips 船只种类和bbox检测代码链接 https://github.com/HiBugs/CenterNet结果Face测试:使用原图分辨率,未使用Multi Scale,在验证集上进行测试。【分别使用CocoAPI和WiderFace eval_tools】BackboneAPAP50AP75APSAPMAPLDL

2020-06-06 14:27:12 1570

原创 从源码安装人脸Dlib库报错。cuda_dlib.cu(1762): error

从GitHub上下载源码Dlib库进行安装时,报如下错误:[ 1%] Building NVCC (Device) object dlib/CMakeFiles/dlib.dir/cuda/dlib_generated_cuda_dlib.cu.o/home/zjb/dlib/dlib/cuda/cuda_dlib.cu(1762): error: calling a constexpr __host__ function("log1p") from a __device__ function(".

2020-06-06 14:25:17 974

原创 QObject::moveToThread: Current thread is not the object`s thread. Cannot move to target thread

报错:Opencv无法显示图像,报错QObject::moveToThread: Current thread is not the object's thread . Cannot move to target thread解决方案:conda install pyqt,完美解决。PS:因为这个报错信息比较模糊不够具体,所以无法定位问题的根源在哪。在网上寻找了各种解决方法,基本上都是如下的方法,但是我是在实验室的服务器上,没有sudo权限,没法apt-get,因此下面这种方案并没有亲自尝试,这里贴出

2020-06-06 14:22:38 21807 27

原创 keras和tf.keras的坑。ValueError: Output of generator should be a tuple (x, y, sample_weight) or (x, y)

问题:用keras可以正常使用,而使用tf.keras时,(版本keras=2.2.4, tf=1.14),会报如下错误:ValueError: Output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: [array...分析:看报错信息大概可以分析出,是generator_output这的问题,大概是我们自己数据增强后,生成的数据有问题。那为什么keras可以正常使用,而tf.keras就不能呢。

2020-06-06 14:17:34 1938

原创 undefined symbol: __cudaPopCallConfiguration

报错:undefined symbol: __cudaPopCallConfiguration原因:cuda的版本和pytorch的cuda版本不一致。解决方案:重新安装pytorch。版本对应关系 https://pytorch.org/get-started/previous-versions/示例如下:conda install pytorch=0.4.1 torchvision cuda92 -c pytorch...

2020-06-06 14:11:22 837 1

原创 fatal error: cuda_runtime.h: No such file or directory

程序报错:cuda_runtime.h: No such file or directory原因:cuda路径未设置或设置错误。解决方案:在~/.bashrc文件中加入你的cuda路径;然后重新激活环境source .bashrc(这一步不要忘记)。示例如下:export PATH=${HOME}/cuda/cuda-9.2/bin:$PATHexport LD_LIBRARY_PATH=${HOME}/cuda/cuda-9.2/lib64:$LD_LIBRARY_PATH...

2020-06-06 14:10:01 4764 1

原创 AttributeError: `NoneType` object has no attribute `_inbound_nodes`

操作:原本想在网络中对输入图像tensor进行裁剪,直接用了x = x[:, 0:h2, w1:w3].报错:Keras AttributeError: 'NoneType' object has no attribute '_inbound_nodes'原因:Keras搭建的网络中要用层来表示的,不能直接用Tensor或是Numpy。解决方案:利用Lambda封装成一个Layer。示例如下:slice_input = Lambda(lambda x: x[:, 0:h2, w1:w3])(img

2020-06-06 14:06:18 976

原创 ValueError: Output tensors to a Model must be the output of a TensorFlow `Layer`

操作:想对keras网络最后输出的tensor进行截取,模型中直接写了代码out2 = out[:, :, :, -4:].报错:ValueError: Output tensors to a Model must be the output of a TensorFlow 'Layer'原因:Keras搭建的网络中要用层来表示的,不能直接用Tensor或是Numpy。解决方案:利用Lambda封装成一个Layer。示例如下:# out2 = out[:, :, :, -4:]# 如果直接用上述

2020-06-06 14:00:24 1320

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除