自定义相关工具库
Project description
引言
在实际工作中一些常见的可视化库(例如:matplotlib, cv2, PIL等)对于部分常用功能支持的不够好,在实际使用的时候往往需要进一步改写封装,本库用于记录一些在实际使用的时候基于现有的一些可视化库,自己改写的一些函数,这些函数会比原有的库兼容性更好。
功能描述
CVUtils
包括但是不限于以下功能:
- show_image(image, mode="bgr"):展示图片
- read_image(filename):读取中文路径下的图片
- resize2gray(image, new_shape):统一尺寸并修改为灰度图像
- cv2AddChineseText(img, text, position, textColor=(0, 255, 0), textSize=30, stroke_width=2):在图片中添加中文文本
- copy_files(all_filepath, output_path):使用协程技术拷贝文件,支持批量操作(速度极快)
- split_rectangle_image_from_imageArray(ori_image, left_top_point, right_bottom_point):切分矩形区域
- image_correction(img):霍夫变换图片校正
- Num2Plate(plate_nums):针对车牌识别任务,将数值列表还原为中文车牌
- save_list2txt(list_, output_file):将列表中的内容按行存储到指定文件中
- train_test_split2txt(filenames, test_size=0.2, output_dir=None):训练集测试集切分,针对图片
- COCOLableAnalyse类:将COCO数据集标签转化为其他常用类型。主要有两种:
- a.VOC:coco2voc();
- b.YOLO:coco2yolotxt()
SpiderUtils
包括但不限于以下功能:
- getDouBanComment(url, header):获取豆瓣短评name, comment_time, comment_location, comment字段
- saveListStr2DataFrame(saveExcelPath=None, **kwargs):将列表字段转化为数据框或存储到Excel文件中
- getSinaText(url, header={}):获取新浪微博博文正文。
- getSinaComment(url, header={}):获取新浪微博博文评论。
- get_stopword():获取停用词点
- Get_Bilibili_Vedio(url):B站视频下载 download():调用此方法可以下载视频.
- concatAV(inputpath='.', outputpath='ConcatResult'):用于合并音频和视频。
更多功能持续开发中~~~
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
MingLogUtils-2.0.3.tar.gz
(21.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file MingLogUtils-2.0.3.tar.gz.
File metadata
- Download URL: MingLogUtils-2.0.3.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9948386fcda3b5456e615c016c4e6722872bad15415857e9e86857820fb1b9a7
|
|
| MD5 |
8831be37e1ce8b5e29bc76fda52ff89e
|
|
| BLAKE2b-256 |
0ce3e4a5aef287a7f43852c697b689d0d53509f616fed1d8c93baf5653959225
|
File details
Details for the file MingLogUtils-2.0.3-py3-none-any.whl.
File metadata
- Download URL: MingLogUtils-2.0.3-py3-none-any.whl
- Upload date:
- Size: 27.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d7e04eecabcfbea6a5e7eced1fc0087317a05f006a279e1e2bbf7352e9d2cd8
|
|
| MD5 |
7b5831f2f91f44b7b5067e226d0c3c0f
|
|
| BLAKE2b-256 |
553855507f5c8e872275aebd7336d299240ca72f9ef6bd1e7e06de24f7b404d1
|