
python
NineDays66
email:547691062@qq.com
展开
-
python 安装
python原创 2023-01-31 19:22:55 · 319 阅读 · 0 评论 -
python目标检测 训练数据预处理及加载代码
数据预处理def letterbox_image(img, inp_dim): '''resize image with unchanged aspect ratio using padding Parameters ---------- img : numpy.ndarray Image inp_dim: tuple(int) shape of the reszied image ...原创 2020-08-25 09:53:07 · 1363 阅读 · 0 评论 -
python util
获取文件夹下所有文件:def get_all(cwd, result): get_dir = os.listdir(cwd) for i in get_dir: sub_dir = os.path.join(cwd,i) if os.path.isdir(sub_dir): get_all(sub_dir, resul...原创 2019-10-14 16:55:13 · 1672 阅读 · 0 评论 -
python 画 ROC 曲线
python 画 ROC 曲线的实现代码import numpy as npimport matplotlib.pyplot as pltfrom sklearn.metrics import auc ###计算roc和aucimport pandas as pdbase = "D:\\WFLW\\wflw_blur_128\\ROC\\"df =pd.read_csv(...原创 2018-10-16 10:31:22 · 8404 阅读 · 7 评论 -
3行代码实现 Python 并行处理,速度提高6倍!
来源 | towardsdatascience.com编译 | 数说君出品 | 数说工作室原标题:Here’s how you can get a 2–6x speed-up on your data pre-processing with Python最近在 Towards Data Science 上看到一篇文章,如何用 Python 进行并行处理,觉得非常有帮助,因此介绍...转载 2018-12-29 17:19:44 · 33815 阅读 · 9 评论 -
python 根据 url 下载图片
前言最近在做机器学习下的人脸识别的学习,机器学习这个东西有点暴力,很大程度上靠训练的数据量来决定效果。为了找数据,通过一个博客的指导,浏览了几个很知名的数据集。几个大型数据集是通过发邮件申请进行下载,几个小型数据集直接在网页的链接下载,还有一个Pubfig数据集则是提供了大量图片的链接来让我们自己写程序来下载。权衡了数据量的需求,最后选择Pubfig的数据集,于是就自己写了一个pyth...转载 2019-01-02 16:40:34 · 12243 阅读 · 0 评论 -
Python 读取 sqlit 数据库
import sqlite3with sqlite3.connect('aflw.sqlite') as conn: #连接 cursor1 = conn.cursor() cursor1.execute("select filepath from FaceImages;") cursor2 = conn.cursor() cursor2.exe...原创 2019-01-08 15:11:39 · 258 阅读 · 1 评论 -
Wider-Face 数据集标签处理
#!/usr/bin/env python# -- coding: utf-8 --"""Copyright (c) 2018. All rights reserved.Created by C. L. Wang on 2018/6/14"""import osfrom PIL import Imagebase = 'E:\\dataset\\face_detect\\wide...原创 2019-07-24 08:53:07 · 2826 阅读 · 0 评论