- 博客(42)
- 收藏
- 关注
原创 opencv同时显示两张图片
import cv2import numpy as npdef img_show(name, img): cv2.imshow(name, img) cv2.waitKey(0) img1=cv2.imread(path1)img2=cv2.imread(path2)img1 = cv2.resize(img1, (640, 640))img2 = cv2.resize(img2, (640, 640))new_img = np.hstack([img1, .
2022-04-08 10:32:32 5693
原创 python opencv 问题
cv2.error: OpenCV(4.5.3) /tmp/pip-req-build-fvfwe_ss/opencv/modules/highgui/src/window.cpp:1274: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, in.
2022-03-01 13:29:38 2329
原创 pytesseract输出有空格或其他字符
是版本问题,把原来的tesseract卸载了,重新安装0.1.3版本的pip installtesseract==0.1.3
2022-01-03 01:40:43 855
原创 pytorch历史版本命令安装地址
pytorc对应cuda版本https://pytorch.org/get-started/previous-versions/
2021-05-12 20:14:59 257 1
原创 python对图像批量重命名
命名后的格式如下图所示:代码:# -*- coding:utf-8 -*-import osimport randomclass ImageRename(): def __init__(self): self.path = './侧脸1/' print(self.path) def rename(self): filelist = os.listdir(self.path) random.shuffl
2020-06-16 18:03:00 407
原创 python txt预处理,处理成 需要的格式
处理之前的txt文件内容:bounding_boxes_17889.txt处理之后的txt文件内容:test.txt代码如下:#encoding:utf-8txt_path='./bounding_boxes_17889.txt'after_handling_txt='./Annotations/test.txt'f=open(txt_path,'r')f_lines=f.readlines()f_txt=open(after_handling_txt,'w')cl
2020-06-16 16:34:30 356
原创 删除xml或者图像文件夹多余的文件
#encoding:utf-8import os #os:操作系统相关的信息模块#存放原始图片地址data_img_dir = "./faceimage/"#存放原始xml地址data_xml_dir="./faceimage_xml/"#建立列表,用于保存图片信息jpg_list=[]#建立列表,用于保存xml信息xml_list=[]for file in os.listdir(data_img_dir): #file为current_dir当前目录下图片名 if .
2020-06-16 16:20:08 1346
原创 python处理图像文件中损坏的图片以及批量裁剪指定的图片大小
#encoding:utf-8'''该代码主要用来处理从网上爬虫下来的损坏图片,以及批量裁剪图片'''from PIL import Imageimport cv2import os'''------------ start 检测图像文件是否损坏 ---------------- '''def is_valid_image(path): try: bValid=True fileobj=open(path,'rb.
2020-06-09 15:07:32 1134
原创 Ubuntu镜像软件下载
从网易镜像软件下载,超级快的http://mirrors.163.com/ubuntu-releases/点击需要下载版本,里面有对应版本,例如我选择64位的桌面版
2020-05-27 17:30:37 236
原创 python3全局舍弃了reduce函数
python2全局带有reduce函数,可以直接调用result=reduce(lambda x,y: x+y,range(1,101)),但是python3使用的需要调用functools模块from functools import reduce#encoding:utf-8'''统计1到100的之和'''sum=0for i in range(1,101): sum+=iprint (sum)# 或者另外一种函数 ps:reduce手机python
2020-05-16 17:12:05 282
原创 python if else没有对齐的情况
#encoding:utf-8'''题目:求100之内的素数。程序分析:无。'''lower = int(input("输入区间最小值: "))upper = int(input("输入区间最大值: ")) for num in range(lower,upper + 1): # 素数大于 1 if num > 1: for i in range(2,num): if (num % i) == 0: .
2020-05-16 17:08:36 2059 2
转载 python处理(修改)xml的类别信息
原博客网址修改xml的class的信息#!/usr/bin/env python2# -*- coding: utf-8 -*- import osimport xml.etree.ElementTree as ET origin_ann_dir = './冲锋枪xml/'# 设置原始标签路径为 Annosnew_ann_dir = './tmp/'# 设置新标签路径 Anno...
2020-04-10 18:26:54 608
原创 配置tf-faster-rcnn及训练自己的数据
本机的python环境采用anaconda3创建的python2.7,其中所有安装的依赖和库均在这个虚拟环境中问题一:E tensorflow/stream_executor/cuda/cuda_dnn.cc:363] Loaded runtime CuDNN library: 7.0.5 but source was compiled with: 7....
2020-01-09 11:07:07 222
原创 py-faster rcnn训练遇到的错误
训练过程中错误1:开始训练faster-r-cnn的时候AttributeError: 'module' object has no attribute 'text_format'由于protobuf的版本问题,在./lib/fast_rcnn/train.py增加 import google.protobuf.text_format 即可。训练过程中错误2:TypeErr...
2019-11-29 15:13:31 450
原创 caffe 问题收集解决办法
问题1:编译caffe的命令make all -j和make test -j都没有问题,但是在执行sudo make runtest -j8时报错:Makefile:543: recipe for target 'runtest' failedmake: *** [runtest] Aborted (core dumped)出现错误原因是在Makefile.config使用的是a...
2019-11-29 09:43:04 418
原创 Python 提取图像信息保存为TXT、xml格式
1.首先提取图像为TXT格式,格式如下: xxxx.jpg 通道数 xmin,ymin,xmax,ymax2.代码如下# -*- coding:utf-8 -*-'''作者:tanbin时间:2019年10月31日代码工作内容:1.对文件下sex_image/*.jpg进行重命名 2.对对文件下sex_image/*.jpg'''...
2019-11-01 11:20:46 4352 2
原创 Linux shell脚本下载指定网址的图片
1、图片链接在一个文件夹下的txt文本里,如以下靓图所示,其中IMAGES是运行后shell脚本下载的图像2、she'll脚本放在你是nsfw_data_scrper/scrpts中3、下载sexy图像为例代码#!/bin/bashscripts_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null...
2019-10-18 10:43:59 1057
转载 【转载】python随机复制图片
原文地址# author by LYS 2017/5/24# for Deep Learning course'''1. read the whole files under a certain folder2. chose 10000 files randomly3. copy them to another folder and save'''import os, rand...
2019-10-18 10:36:30 165
转载 详细介绍Tensorflow中tensorboard日志的生成和显示
转载【详细介绍Tensorflow中tensorboard日志的生成和显示】tensorboardhttps://blog.csdn.net/hnwolfs/article/details/81122380
2019-03-13 21:16:50 1396
转载 图片随机抽样
clear all;clc;N=1000; %需要抽取的图片的数量num=3687; %图片的总数量p=randperm(num);%随机生成1~num个随机整数a=p(1:N); %取p的前N个数for i=1:N %读取图片的路径和名字,你需要修改为你图片库的路径,注意用双斜线 imageName=sprintf('F:...
2018-12-09 09:57:45 1099
转载 smooth_L1_loss_layer.cpp:28] Check failed: bottom[0]->channels() == bottom[1]->channels() (12 vs. 84
【转载】smooth_L1_loss_layer.cpp:28] Check failed: bottom[0]->channels() == bottom[1]->channels() (12 vs. 84https://blog.csdn.net/qq_36219202/article/details/72896203https://blog.csdn.net/forest_w...
2018-10-23 16:08:33 331
原创 cuda历史版本和cudnn的下载地址
cuda历史版本下载地址(https://developer.nvidia.com/cuda-toolkit-archive)cudnn下载地址(https://developer.nvidia.com/rdp/cudnn-archive)
2018-07-26 22:16:38 20353 3
原创 caffe断点训练
./build/tools/caffe train -solver example/mnist/lenet_solver.prototxt -snapshot example/mnist/lenet_iter_5000.solverstate
2018-05-14 19:18:24 428
转载 制作自己的数据集,并使用Faster Rcnn训练模型
一、修改图片名称使用下面的程序可以快速修改文件夹中的图片名称path = 'G:\Faster_CNN\cars\';%所有图片存放的路径D = dir([path '*.bmp']);%将该路径下的所有文件读取成一个结构体for i = 1:length(D)%遍历每一张图片 image_name = D(i).name;%每一张图片的名字 I = imread(strc...
2018-04-24 23:25:01 1232
转载 VOC数据集制作1——框图工具 安装与配置【转载别人的博客,侵删】
https://blog.csdn.net/liuweizj12/article/details/53192005VOC框图工具
2018-04-24 23:09:44 207
转载 深度学习图片文字定位识别
https://blog.csdn.net/haluoluo211/article/details/77776976?locationNum=8&fps=1
2018-04-23 16:38:48 5431 1
转载 Ubuntu 16.04上安装Caffe(CPU only)
https://www.linuxidc.com/Linux/2016-09/135034.htm在这部分的时候,要先sudo su,进入超级用户,才用pip安装Python文件里的东西。
2018-04-17 14:10:06 167
转载 faster rcnn编译安装
转载:Caffe学习系列——Faster-RCNN训练自己的数据集http://blog.csdn.net/CV_adventurer/article/details/72805852转载: ...
2018-03-20 11:08:15 154
转载 【caffe学习】cuda7.5+caffe安装
cuda7.5安装可以参考请参考博客:http://mp.blog.csdn.net/postedit/79617902编译caffe请参考这位大神的博客http://blog.csdn.net/u013983674/article/details/54172268【Ubuntu14.04 安装CUDA7.5 + Caffe + cuDNN】...
2018-03-20 10:07:45 135
原创 ubuntu14.04安装cuda7.5(包含显卡驱动)
cpu:i7win10引导的双系统内存:16G集成显卡Inite+独立显卡Nvidia gtx 960操作系统:Ubuntu14.04(内核4.2.0-27-generic)cuda7.5 一、安装Ubuntu系统,请参考百度自行安装(用U盘做成系统盘,安装)二、安装cuda7.5(不用先安装NVIDIA驱动,安装cuda时会自动安装驱动程序,如果出现问题再使用命令sudo apt-get in...
2018-03-19 22:08:03 894
转载 【转载】ubuntu14.04+cuda7.5安装 官方步骤版
http://blog.csdn.net/l297969586/article/details/53320706
2018-03-13 22:07:26 114
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人