随笔分类 -  python

关于python
摘要:![](https://img2023.cnblogs.com/blog/3005444/202309/3005444-20230905165006614-415716732.png) >报错 ![](https://img2023.cnblogs.com/blog/3005444/202309/3 阅读全文
posted @ 2023-09-05 16:51 __username 阅读(139) 评论(0) 推荐(0)
摘要:# cython >它是Python的超集。它允许开发人员编写使用Python语法的代码,并将其转换为C语言的扩展模块或优化的Cython代码,以提高Python程序的性能。 Cython具有以下主要特点和用途: >1. 性能优化:通过将Python代码转换为C代码,Cython可以提高Python 阅读全文
posted @ 2023-09-03 12:09 __username 阅读(40) 评论(0) 推荐(0)
摘要:![](https://img2023.cnblogs.com/blog/3005444/202309/3005444-20230902212617419-130781769.png) ![](https://img2023.cnblogs.com/blog/3005444/202309/30054 阅读全文
posted @ 2023-09-02 21:26 __username 阅读(13) 评论(0) 推荐(0)
摘要:使用uwsgi开启web服务 [uwsgi] #项目路径 chdir = /home/Fire9/code/weibo #虚拟环境环境路径 virtualenv = /home/Fire9/code/weibo/.venv #保存主进程的进程号 pidfile = uwsgi.pid #指的后台启动 阅读全文
posted @ 2023-08-31 21:51 __username 阅读(108) 评论(1) 推荐(0)
摘要:# 地址 https://github.com/PaddlePaddle/FastDeploy/blob/develop/README_CN.md#fastdeploy-quick-start-python >可选择gpu or cpu 跑 ![](https://img2023.cnblogs.c 阅读全文
posted @ 2023-08-30 22:24 __username 阅读(230) 评论(0) 推荐(0)
摘要:# demo # 二维数据切片 ```python a = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) print(a) print(a.size) print(a.shape) print(a.ndim) # shape有几位,他 阅读全文
posted @ 2023-08-30 16:13 __username 阅读(50) 评论(0) 推荐(0)
摘要:```python import time import requests, base64, cv2 # url = 'http://127.0.0.1:5555/yolov5' url = 'http://43.139.184.232:5555/yolov5' def image_to_base6 阅读全文
posted @ 2023-08-28 16:10 __username 阅读(64) 评论(0) 推荐(0)
摘要:# opencv > 图像 RGB > > opencv读取的格式是BGR ## 基本用法 ### 读取图片 ```python import cv2 img = cv2.imread(r'C:\Users\Administrator\Pictures\951c76ee-469e-4084-96db 阅读全文
posted @ 2023-08-27 11:54 __username 阅读(16) 评论(0) 推荐(0)
摘要:# demo ```python import base64 from io import BytesIO from PIL import Image import cv2 def img_base64(): img = cv2.imread('2.png') # 确保 '2.png' 位于相同目录 阅读全文
posted @ 2023-08-25 22:22 __username 阅读(42) 评论(0) 推荐(0)
摘要:# ocr 文字识别 服务 利用百度开源模型:地址:https://github.com/PaddlePaddle/PaddleHub/tree/develop/modules/image/text_recognition/chinese_ocr_db_crnn_mobile # 一个开发web服务 阅读全文
posted @ 2023-08-24 18:54 __username 阅读(40) 评论(0) 推荐(0)
摘要:# 问题截图 > 前面有一个问题,error:说是找不到文件,在公司没写博客,没截图 ![](https://img2023.cnblogs.com/blog/3005444/202308/3005444-20230823195457027-1789797198.png) # 解决方法 把进入ana 阅读全文
posted @ 2023-08-23 19:57 __username 阅读(12) 评论(0) 推荐(0)
摘要:# 地址 https://docs.opencv.org/4.x/db/deb/tutorial_display_image.html 阅读全文
posted @ 2023-08-23 16:03 __username 阅读(13) 评论(0) 推荐(0)
摘要:# 链接 https://github.com/PaddlePaddle/PaddleHub/tree/develop/modules/image/text_recognition/chinese_ocr_db_crnn_mobile 阅读全文
posted @ 2023-08-23 14:42 __username 阅读(17) 评论(0) 推荐(0)
摘要:# 代码如下,没有优化(只实现) >test2_trans.py ```python import torch import cv2 from PIL import Image from io import BytesIO import os pt_path = r'E:\Code\Python\y 阅读全文
posted @ 2023-08-23 10:55 __username 阅读(486) 评论(0) 推荐(0)
摘要:# demo ```python from flask import Flask, render_template, request, jsonify app = Flask(__name__) @app.route('/', methods=['GET', 'POST']) def index() 阅读全文
posted @ 2023-08-22 20:20 __username 阅读(63) 评论(0) 推荐(0)
摘要:# demo ```python import torch import cv2 from PIL import Image # pt_path = r'E:\Code\Python\YoLov5\yolov5\yolov5s.pt' pt_path = r'E:\Code\Python\yolov 阅读全文
posted @ 2023-08-22 16:19 __username 阅读(694) 评论(0) 推荐(0)
摘要:# demo ## 图片转base64 ```python def image_to_base64(image_path): import base64 with open(image_path, "rb") as image_file: image_data = image_file.read() 阅读全文
posted @ 2023-08-22 16:13 __username 阅读(595) 评论(0) 推荐(0)
摘要:# 一个0到1的案例 后续会继续补充 > 环境python3.8.10 ## First - github下载项目:https://github.com/ultralytics/yolov5/tree/master - cd yolov5, pip install -r requirements.t 阅读全文
posted @ 2023-08-22 10:25 __username 阅读(305) 评论(0) 推荐(0)
摘要:# download他人项目-创建虚拟环境 1. 这是别人的项目 ![](https://img2023.cnblogs.com/blog/3005444/202308/3005444-20230819230502809-1321066083.png) 2. 打开pycahrm的终端,创建虚拟环境 阅读全文
posted @ 2023-08-19 23:14 __username 阅读(19) 评论(0) 推荐(0)
摘要:# 效果 ![](https://img2023.cnblogs.com/blog/3005444/202308/3005444-20230819174404343-1933435526.png) # 代码 ```python import tkinter as tk from tkinter im 阅读全文
posted @ 2023-08-19 17:44 __username 阅读(68) 评论(0) 推荐(0)