自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(137)
  • 收藏
  • 关注

原创 Clip image and shp

【代码】Clip image and shp。

2024-03-21 03:56:18 91

原创 Python shp2txt for YOLO

【代码】Python shp2txt for YOLO。

2024-03-21 03:55:04 100

原创 mmdetection Visualization

2. Predict。

2024-03-21 03:52:17 109

原创 train multiple channel data using YOLO

把hsv_h,hsv_s和hsv_v三个参数设置为0,不做HSV数据增。

2024-03-21 03:51:35 275

原创 train multiple channel data using mmdetection

1. loading。

2024-03-21 03:39:44 112

原创 python SHP2COCO

1. 将shp的标签数据转成coco。

2024-03-02 03:27:09 952 1

原创 统计数据中包含某类的影像数和目标数

【代码】统计数据中包含某类的影像数和目标数。

2023-04-21 16:47:12 128 1

原创 交叉验证三角化结果

三角化与交叉验证

2023-04-11 21:50:01 143

原创 conda创建虚拟环境报错 http

(2)恢复默认源:conda config --remove-key channels,再重新创建。(1)查看 gesit ~/.condarc。2. 总是http error。1. conda创建虚拟环境。

2022-09-15 22:49:25 642

原创 python cv2利用掩膜将图片透明背景

python cv2 利用掩膜将图片透明背景

2022-07-25 19:02:20 2976

原创 meanshift

import numpy as npfrom sklearn.cluster import MeanShift, estimate_bandwidthdef meanShift(features): ''' ''' features = np.array(features).astype(np.float64) '''本质上就是求平均最远k近邻距离, quantile的值表示进行近邻搜索时候的近邻占样本的比例''' bandwidth = estim..

2022-01-13 16:00:38 434

原创 抠图-仿射变换-贴图 简易代码段

import cv2import numpy as npfrom PIL import Imagefrom PIL import ImageDrawobliq_img = cv2.imread('1.png') #倾斜影像,新的纹理rows,cols,_ = obliq_img.shape# img_texture = cv2.imread('2.png') #原始纹理img_texture = Image.open('3.png')print('img_texture.size:.

2021-11-15 20:43:25 1976

转载 python 提取骨架

参考:python 简单图像处理(16) 图像的细化(骨架抽取) - xiatwhu - 博客园图像的细化主要是针对二值图而言所谓骨架,可以理解为图像的中轴,,一个长方形的骨架,是它的长方向上的中轴线,圆的骨架是它的圆心,直线的骨架是它自身,孤立点的骨架也是自身。骨架的获取主要有两种方法:(1)https://www.cnblogs.com/xianglan/archive/2011/01/01/1923779.htmlimport cv2# 输入需要细化的图片(经过二值化处理的图片)和映射矩

2021-09-11 15:25:32 2515

原创 Detectron2 Draw Loss Curve

import jsonimport refrom pylab import *fig = figure(figsize=(8,6), dpi=300)y1 = fig.add_subplot(111)y1.set_xlabel('Iterations')y2 = y1.twinx()y1.set_ylim(0,1.0)parsed=[]with open('./pointrend_rcnn_r101_FPN_3x/metrics.json') as f: try: .

2021-08-28 15:31:21 485

原创 笔记:Training Schedules

mmdetection, detectron2中常见的,例如:mask_rcnn_r101_fpn_1x_coco.pymask_rcnn_r101_fpn_2x_coco.py1x, 2x表示epoch、和lr下降规则的设置。1x 表示:在总batch size为16时,初始学习率为0.02,在6万轮和8万轮后学习率分别下降10倍,最终训练9万轮2x 策略为1x策略的两倍,同时学习率调整位置也为1x的两倍。...

2021-06-29 09:55:42 416 1

原创 detectron2 测试训练好的模型并画出结果图

import numpy as npimport cv2import osfrom PIL import Image#from matplotlib import pyplotimport matplotlib.pyplot as pltimport random#from google.colab.patches import cv2_imshowimport detectron2from detectron2.utils.logger import setup_loggerset.

2021-06-27 18:18:42 2510 1

原创 Detectron2 (BMask R-CNN) 安装并训练自己的数据

(1) create envs conda create -n env_name python=version_idfff

2021-06-19 11:33:06 1058 6

原创 最近笔记,一些有用的连接(不断更新中)

1:https://www.cnblogs.com/dan-baishucaizi/p/14208051.html

2021-06-16 09:49:34 71

原创 python 旋转图像和JSON坐标

# coding:utf-8import cv2import osimport numpy as npimport mathimport copyimport jsondef rotate_about_center(src, angle, scale=1.): w = src.shape[1] h = src.shape[0] rangle = np.deg2rad(angle) #angle in radians nw = (abs(np.sin(ra.

2021-06-11 16:15:57 655 7

原创 python 最小二乘平面拟合

import numpy as npimport matplotlib.pyplot as pltfrom mpl_toolkits.mplot3d import Axes3Dimport math# 从txt文档读取点def readTxt(textfile): with open(textfile, 'r') as f: x2, y2, z2 = [], [], [] for line in f.readlines(): li.

2021-06-11 14:34:44 1202

原创 labelme 镜像扩充数据

# coding:utf-8import cv2import osimport numpy as npimport mathimport copyimport jsondef enhancement_using_mirror(modes, ImagePath,AnnotationsPath,ImageSavePath,AnnotationsSavePath): #mirror for mode in modes: for imgfile in os.listdir(Image.

2021-05-25 20:10:49 379

原创 mmdetection # test and visualize test result

evaluationtools/dist_test.sh configs/swin/cascade_mask_rcnn_swin_base_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_coco.py latest.pth 1 --eval bbox segmsave resultrefer to demo/image_demo.py(1) edit mmdet/apis/inference.py show_result_pyp.

2021-04-29 10:56:24 777

原创 mmcv版本过低 Error: ImportError: cannot import name ‘get_git_hash‘

mmcv errorfrom mmcv.utils import get_git_hashImportError: cannot import name ‘get_git_hash’UNINSTALL mmcv-full 1.0.4pip uninstall mmcv-full INSTALL mmcv-full 1.3.1pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.5.0/ind

2021-04-21 20:06:09 9625

原创 labelme数据转coco instance segmentation

转数据参考:https://www.freesion.com/article/1518170289/需要安装pycocotools, 参考这里:https://blog.csdn.net/summermaoz/article/details/115969308?spm=1001.2014.3001.5501可能需要根据自己的标注情况做一点点修改 labelme2coco.py#!/usr/bin/env pythonimport argparseimport collectionsimport

2021-04-21 19:09:16 495 2

原创 windows 10 安装pycocotools 报错error: Microsoft Visual C++ 14.0 or greater is required.

windows, python3.6环境下安装pycocotools, :pip install pycocotools会报错,和VS有关:“error: Microsoft Visual C++ 14.0 or greater is required.”解决办法:1.安装 VS20192. 参考这里https://docs.microsoft.com/en-us/answers/questions/136595/error-microsoft-visual-c-140-or-greater-i

2021-04-21 18:22:19 1304

原创 Trans2Seg 透明物体检测 transformer

github:paper:data:config file: ./configs/trans10kv2/trans2seg/***.yamledit class num, class name: ./segmentron/data/dataloadertrain:bash tools/dist_train.sh configs/trans10kv2/trans2seg/trans2seg_medium.yaml```bash在这里插入代码片test:bash tools/dis

2021-04-20 11:03:46 666

原创 JSON2Mask

import jsonfrom PIL import Imagefrom PIL import ImageDrawimport PILimport osimport numpy as npfrom labelme import utilsimport imgvizimport yamljsonfolder = './JSON/'out_folder = 'labelme_json'jsonfiles = os.listdir(jsonfolder)for jsonfile i.

2021-04-17 18:15:21 314

原创 Recurrent Feature Reasoning for Image Inpainting-image inpainting 实践

Image inpainting 论文总结: https://github.com/geekyutao/Image-InpaintingRecurrent Feature Reasoning for Image Inpaintinggithub:https://github.com/jingyuanli001/RFR-Inpainting环境:Ubuntu16.04, python 3.6, cuda 10.0, pytorch 1.1.0python run.py --data_roo.

2021-01-21 15:27:42 501 5

原创 Latex添加svg图片

参考:http://ctan.imsc.res.in/info/svg-inkscape/InkscapePDFLaTeX.pdfhttp://www.yeslib.com/detail/36001. 下载inkscape:https://inkscape.org/release/all/windows/64-bit/exe/安装好后记得添加环境变量。2. 用Visio输出svg格式文件,并将其转为 pdf和pdf_texinkscape -D -z --file=image.s.

2020-12-10 21:57:10 3905

原创 把一个3D maxs(.max格式)建的模型,放到3D Scene(.obj格式)中

把一个3D maxs(.max格式)建的模型,放到3D Scene(.obj格式)中,主要步骤:(1)利用smart3D建立场景模型(相对坐标系),模型为.obj格式。(2)利用3dsmax画路牌3D模型,.max格式。场景模型没有采用世界坐标系,因此需要将物体的大小,转换到相对坐标系中。(3)在3dsmax中同时打开场景和模型。调整模型和场景的相对关系。注意:在3dsmax中打开的场景模型,质量很差(4)在3dsmax中,输出模型 .fbx格式,并打开展示。...

2020-11-30 14:50:40 364

原创 Python SGBM

cv2.StereoSGBM_create([,minDisparity [,numDisparities [,blockSize [,P1 [,P2 [,disp12MaxDiff [,preFilterCap [,uniquenessRatio [,speckleWindowSize [,speckleRange [,mode]]]]]]]]]]]])minDisparity 最小可能的差异值。通常情况下,它是零,但有时整流算法可能会改变图像,所以这个参数需要作相应的调整。 numDisp

2020-11-25 20:56:58 2132

转载 密集匹配SGM python

记录一下代码参考:https://github.com/bkj/sgm理论部分参考:https://www.cnblogs.com/wxxuan/p/13595014.htmlhttps://zhuanlan.zhihu.com/p/49272032https://zhuanlan.zhihu.com/p/159055657"""python implementation of the semi-global matching algorithm from Stereo Proc

2020-11-22 15:50:53 1712 2

原创 点云拟合平面-最小二乘法

参考:https://blog.csdn.net/qq_45427038/article/details/100139330import numpy as npimport matplotlib.pyplot as pltfrom mpl_toolkits.mplot3d import Axes3Dimport math# 从txt文档读取点def readTxt(textfile): with open(textfile, 'r') as f: x2, y2, z

2020-11-18 17:23:33 3486

原创 Draw Feature map

import cv2import timeimport osimport matplotlib.pyplot as pltimport torchfrom torch import nnimport torchvision.models as modelsimport torchvision.transforms as transformsimport numpy as npsavepath='./features_map'if not os.path.exists(savepath.

2020-11-06 09:28:57 351 1

原创 Python plot point cloud and max bounding box of point cloud.

# 点云显示# 外接包围盒显示import osfrom matplotlib import pyplot as pltfrom mpl_toolkits.mplot3d import Axes3Ddef displayPoint(data): #解决中文显示问题 # plt.rcParams['font.sans-serif']=['SimHei'] # plt.rcParams['axes.unicode_minus'] = False #散点图参数设置 fig=plt..

2020-10-05 21:13:56 436 1

转载 python-pcl installation and examples

Reference github link: https://github.com/strawlab/python-pcl/blob/master/appveyor.yml1. Installation in Ubuntu16.04sudo apt install libpcl-dev -ypip install python-pcl2. statistical outlier filter: using a recursive function# -*- coding: utf-8

2020-10-04 21:33:36 155

原创 file format conversion: pcd2txt, txt2pcd

file format conversion, including pcd2txt, txt2pcd# file format conversionimport mathimport osimport pcldef txt2pcd(filename): xlist = [] ylist = [] zlist = [] with open(filename, 'r') as file_to_read: while True:

2020-10-04 21:27:14 220

原创 Some useful Links: Github Project, Journal, some tools.

GitHub Projectimbalance problem in object detection:https://github.com/kemaloksuz/ObjectDetectionImbalanceEnglishComplex Synonyms, Complex Antonyms | Thesaurus.comDemo documentGrammarly for Chrome - Chrome Web StoreSic-HubSci-Hub: remo...

2020-09-15 12:56:24 172

转载 国外遥感GIS期刊整理

国外遥感GIS期刊整理http://blog.sciencenet.cn/home.php?mod=space&do=blog&id=284616

2020-08-20 22:09:03 518

原创 cuda10.0 cuda10.1 安装及切换

将cuda-1.0切换成cuda-10.1的过程如下:1. sudo rm -rf /usr/local/cuda #删除之前生成的软链接2. sudo ln -s /usr/local/cuda-10.1 /usr/local/cuda #生成新的软链接

2020-08-03 20:36:08 5459 1

空空如也

空空如也

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

TA关注的人

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