![](https://img-blog.csdnimg.cn/04005b1256ab4bde99415b32c047e153.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
python
python code
我渊啊我渊啊
这个作者很懒,什么都没留下…
展开
-
python——批量png转jpg(通道数问题)
python——批量png转jpg(通道数问题)原创 2022-10-18 20:44:03 · 375 阅读 · 0 评论 -
FaceNet-pytorch(fixing data imbalance-CASIA)
FaceNet-pytorch(fixing data imbalance-CASIA)原创 2022-09-25 17:02:22 · 488 阅读 · 0 评论 -
python 解决data imbalance问题(以casia-webface为例)
tools原创 2022-09-14 20:40:21 · 480 阅读 · 0 评论 -
pytorch-FaceNet(添加face match function)
FaceNet相关原创 2022-09-10 15:12:09 · 546 阅读 · 0 评论 -
pytorch-搭建图片分类神经网络模板(以Kaggle-ClassifyLeaves为例)
图片分类模板原创 2022-08-26 10:26:18 · 446 阅读 · 0 评论 -
pytorch-Dataset自定义
【代码】pytorch-Dataset自定义。原创 2022-08-25 10:55:37 · 353 阅读 · 0 评论 -
SciencePlot-科研绘图
SciencePlot原创 2022-08-05 13:04:56 · 386 阅读 · 0 评论 -
openCV5-getTickCount
使用openCV检测效率e1 = cv2.getTickCount ()#######################运行的代码#######################e2 = cv2.getTickCount ()time = (e2 - e1) / cv2.getTickFrequency ()原创 2022-01-29 09:42:35 · 3192 阅读 · 0 评论 -
OpenCV1_摄像头图像获取与编辑
import cv2 as cvdispW=640dispH=480flip=0camSet='nvarguscamerasrc ! video/x-raw(memory:NVMM), width=3264, height=2464, format=NV12, framerate=21/1 ! nvvidconv flip-method='+str(flip)+' ! video/x-raw, width='+str(dispW)+', height='+str(dispH)+', format=原创 2022-01-22 09:49:46 · 1287 阅读 · 0 评论 -
openCV4-mixImage
import cv2frame1 = cv2.imread ('C:/Users/64679/Desktop/1.JPG')frame2 = cv2.imread ('C:/Users/64679/Desktop/2.JPG')dst = cv2.addWeighted (frame1, 0.5, frame2, 0.5, 0)cv2.imshow ('dog1', frame1)cv2.imshow ('dog2', frame2)cv2.imshow ('dogMix', dst)c.原创 2022-01-27 00:22:38 · 2745 阅读 · 0 评论 -
openCV2-TrackBarRGB
import cv2import numpy as npdef nothing(x): passcv2.namedWindow ('Image')frame = np.zeros ((400, 400, 3), np.uint8)cv2.moveWindow ('Image', 0, 0)cv2.createTrackbar ('R', 'Image', 0, 255, nothing)cv2.createTrackbar ('G', 'Image', 0, 255, not原创 2022-01-26 22:33:24 · 888 阅读 · 0 评论 -
opeCV3-Image
`import cv2frame = cv2.imread (‘C:/Users/64679/Desktop/1.JPG’)px = frame[10, 10]blue = frame[10, 10, 0]print ('px= ', px)print ('blue= ',blue)while (1):cv2.imshow (‘dog’, frame)if cv2.waitKey (1) == ord (‘q’):breakcv2.destroyAllWindows ()`...原创 2022-01-26 22:54:35 · 1001 阅读 · 0 评论 -
openCV5-Threshold and Mask
一、掩膜 (Mask)掩膜是用选定的图像、图形或物体,对要处理的图像进行遮挡,来控制图像 处理的区域二、阈值 (Threshold)设定的阈值,将灰度图像转换为二值图像三、流程图四、代码,结果import cv2Dog = cv2.imread ('C:/Users/64679/Desktop/1.JPG')CVlogo = cv2.imread ('C:/Users/64679/Desktop/2.JPG')CVlogoGray = cv2.cvtColor (CVlogo, cv原创 2022-01-28 14:21:29 · 2943 阅读 · 0 评论 -
对人脸口罩数据库的预处理
import osimport shutildef dataset_split(source_dir, outputdir): origin_dir = os.listdir (source_dir) count = 0 # print (origin_dir) # # for i in range (len (origin_dir)): # origin_name = os.path.join (source_dir, origin_dir[原创 2022-03-25 18:16:15 · 5101 阅读 · 1 评论 -
批量FaceAlignment using dlib
# 批量人脸裁剪代码import osimport cv2import dlibdef FaceClip(fliePath, output_image_path): predictor_model = 'shape_predictor_68_face_landmarks.dat' detector = dlib.get_frontal_face_detector () # dlib人脸检测器 predictor = dlib.shape_predictor (pred原创 2022-03-25 07:58:17 · 120 阅读 · 0 评论 -
python读取文件
方法一:os.scandir ( )root_dir = for obj in os.scandir(root_dir): if obj.is_dir(): print (obj.name) if obj.is_file(): print (obj.name)方法二:os.walk ()遍历所有文件,子文件夹原创 2022-03-09 14:13:51 · 827 阅读 · 0 评论 -
python面对对象编程——继承
class A (object): def __init__(self): self.number = 1 def print_info(self): print ('这是父类A')class B (object): def __init__(self): self.number = 2 def print_info(self): print ('这是父类B')class C (A, B):原创 2022-02-22 11:58:47 · 278 阅读 · 0 评论