随笔分类 -  Python

摘要:打开anaconda (如果在pytorch环境,就先执行conda activate pytorch),参考文末 安装: pip3 install opencv-contrib-python -i https://pypi.tuna.tsinghua.edu.cn/simple 如下出现错误是网络 阅读全文
posted @ 2024-02-23 14:28 txwtech 阅读(411) 评论(0) 推荐(0)
摘要:vscode python 快捷键大全 Ctrl+F5 直接执行运行程序 F5进入调试模式 1、通用 Ctrl+Shif+P , F1 打开命令面板 Ctrl+P 快速打开 Ctrl+Shift+N 打开新实例窗口 Ctrl+Shift+W 关闭窗口实例 2、基础编辑 Ctrl+X 剪切 Ctrl+ 阅读全文
posted @ 2024-02-22 09:10 txwtech 阅读(2651) 评论(0) 推荐(1)
摘要:1.下载并安装python 2.打开vsocde 3.点击扩展,输入python并安装 4.按下ctrl+shift+P,输入python:select interpreter并选择 5.选择刚安装的python路径 6. 安装代码对齐插件 https://www.cnblogs.com/txwte 阅读全文
posted @ 2024-02-22 08:58 txwtech 阅读(57) 评论(0) 推荐(0)
摘要:先安装utopep8, 快捷键:shift+alt+F 翻译 搜索 复制 阅读全文
posted @ 2024-02-22 08:49 txwtech 阅读(647) 评论(0) 推荐(0)
摘要:CTRL+G 弹出窗口 输入行号 翻译 搜索 复制 阅读全文
posted @ 2024-02-08 08:17 txwtech 阅读(69) 评论(0) 推荐(0)
摘要:python opencv仿射变化--缩放--平移--旋转 # This is a sample Python script. # Press Shift+F10 to execute it or replace it with your code. # Press Double Shift to 阅读全文
posted @ 2024-02-07 16:58 txwtech 阅读(144) 评论(0) 推荐(0)
摘要:python在图像上绘制文字-中文 simfang.ttf在c盘可以找到,复制到py的相同文件夹 """ coding=utf-8 cv2解决绘制中文乱码的问题 """ import cv2 import numpy as np from PIL import Image, ImageDraw, I 阅读全文
posted @ 2024-02-07 16:57 txwtech 阅读(632) 评论(1) 推荐(0)
摘要:python opencv读取图像矩阵加减乘除操作 # This is a sample Python script. # Press Shift+F10 to execute it or replace it with your code. # Press Double Shift to sear 阅读全文
posted @ 2024-02-05 13:37 txwtech 阅读(152) 评论(0) 推荐(0)
摘要:python numpy_ndarray NumPy(Numerical Python)是Python的一种开源的数值计算扩展。这种工具可用来存储和处理大型矩阵,比Python自身的嵌套列表(nested list structure)结构要高效的多(该结构也可以用来表示矩阵(matrix)),支持 阅读全文
posted @ 2024-02-05 08:37 txwtech 阅读(48) 评论(0) 推荐(0)
摘要:pycharm配置conda pytorch使用opencv方法 选择Conda环境 选择pytorch的python.exe 代码测试 pytorch环境调用opencv打开图像并显示 翻译 搜索 复制 阅读全文
posted @ 2024-02-04 10:00 txwtech 阅读(30) 评论(0) 推荐(0)
摘要:PS D:\deep_learning\yolov5-master> D:\anaconda3\envs\pytorch\python.exe train.py --cfg qiqiu.yaml --epoch 10 --batch-size 2 --device cputrain: weights 阅读全文
posted @ 2024-01-29 15:58 txwtech 阅读(353) 评论(2) 推荐(0)
摘要:里面的文件含义如下: best.pt: 该文件是训练过程中最佳的模型权重参数文件,即validation loss最小的模型。在测试或者推理时,我们可以直接加载该文件来获取最优模型的参数。在weight文件夹中。 hyp.yaml: 该文件包含了模型的超参数,如学习率、权重衰减、数据增强等。我们可以 阅读全文
posted @ 2024-01-29 15:55 txwtech 阅读(688) 评论(0) 推荐(0)
摘要:https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/ 翻译 搜索 复制 阅读全文
posted @ 2024-01-26 09:53 txwtech 阅读(86) 评论(0) 推荐(0)
摘要:很多新手在使用yolov5训练模型的时候会出现爆内存和爆显存问题,一般就是由于worker和batch_size参数设置过大有关,参考如下是解决的方法。 一、workers train.py中关于workers设置代码如下: workers是指数据装载时cpu所使用的线程数,默认为8,但是按照默认的 阅读全文
posted @ 2024-01-24 16:15 txwtech 阅读(1860) 评论(1) 推荐(0)
摘要:yolov5介绍: https://blog.csdn.net/weixin_43334693/article/details/129312409 翻译 搜索 复制 阅读全文
posted @ 2024-01-24 11:43 txwtech 阅读(46) 评论(1) 推荐(0)
摘要:Ultralytics requirements ['gitpython>=3.1.30', 'scipy>=1.4.1', 'seaborn>=0.11.0'] not found, attempting AutoUpdate... 等待自动更新,下载完毕,就Ok了 yolov5,pytorch 阅读全文
posted @ 2024-01-23 17:23 txwtech 阅读(573) 评论(0) 推荐(0)
摘要:(base) C:\Users\Administrator>conda activate pytorch (pytorch) C:\Users\Administrator>conda insatll ultralytics CommandNotFoundError: No command 'cond 阅读全文
posted @ 2024-01-23 17:15 txwtech 阅读(569) 评论(0) 推荐(0)
摘要:检测pytorch是否安装成功,Anaconda Prompt中使用命令import torch和torch.__version__无问题,而cmd不行 翻译 搜索 复制 阅读全文
posted @ 2024-01-23 15:25 txwtech 阅读(71) 评论(1) 推荐(0)
摘要:anaconda No module named 'torch' 检查python对应版本,选择对应的编译器 步骤1. 步骤2. 步骤,1,2执行两次。第一次3.9,第二次3.8 翻译 搜索 复制 阅读全文
posted @ 2024-01-23 14:51 txwtech 阅读(37) 评论(0) 推荐(0)
摘要:(pytorch) C:\Users\Administrator>conda install ultralyticsCollecting package metadata (current_repodata.json): doneSolving environment: failed with in 阅读全文
posted @ 2024-01-23 14:46 txwtech 阅读(627) 评论(0) 推荐(0)