- 博客(137)
- 收藏
- 关注
原创 train multiple channel data using YOLO
把hsv_h,hsv_s和hsv_v三个参数设置为0,不做HSV数据增。
2024-03-21 03:51:35
324
原创 conda创建虚拟环境报错 http
(2)恢复默认源:conda config --remove-key channels,再重新创建。(1)查看 gesit ~/.condarc。2. 总是http error。1. conda创建虚拟环境。
2022-09-15 22:49:25
704
原创 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
479
原创 抠图-仿射变换-贴图 简易代码段
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
1994
转载 python 提取骨架
参考:python 简单图像处理(16) 图像的细化(骨架抽取) - xiatwhu - 博客园图像的细化主要是针对二值图而言所谓骨架,可以理解为图像的中轴,,一个长方形的骨架,是它的长方向上的中轴线,圆的骨架是它的圆心,直线的骨架是它自身,孤立点的骨架也是自身。骨架的获取主要有两种方法:(1)https://www.cnblogs.com/xianglan/archive/2011/01/01/1923779.htmlimport cv2# 输入需要细化的图片(经过二值化处理的图片)和映射矩
2021-09-11 15:25:32
2625
原创 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
539
原创 笔记: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
445
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
2841
1
原创 Detectron2 (BMask R-CNN) 安装并训练自己的数据
(1) create envs conda create -n env_name python=version_idfff
2021-06-19 11:33:06
1122
6
原创 最近笔记,一些有用的连接(不断更新中)
1:https://www.cnblogs.com/dan-baishucaizi/p/14208051.html
2021-06-16 09:49:34
78
原创 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
692
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
1246
原创 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
392
原创 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
816
原创 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
10615
原创 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
537
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
1343
原创 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
716
原创 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
335
原创 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
528
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
4031
原创 把一个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
409
原创 Python SGBM
cv2.StereoSGBM_create([,minDisparity [,numDisparities [,blockSize [,P1 [,P2 [,disp12MaxDiff [,preFilterCap [,uniquenessRatio [,speckleWindowSize [,speckleRange [,mode]]]]]]]]]]]])minDisparity 最小可能的差异值。通常情况下,它是零,但有时整流算法可能会改变图像,所以这个参数需要作相应的调整。 numDisp
2020-11-25 20:56:58
2262
转载 密集匹配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
1808
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
3591
原创 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
375
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
475
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
170
原创 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
237
原创 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
183
转载 国外遥感GIS期刊整理
国外遥感GIS期刊整理http://blog.sciencenet.cn/home.php?mod=space&do=blog&id=284616
2020-08-20 22:09:03
539
原创 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
5492
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人