上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页
摘要: 点击查看代码 import cv2 import numpy as np import json import os def list_jsons(folder_path): for filename in os.listdir(folder_path): if filename.endswith( 阅读全文
posted @ 2024-12-19 10:46 阳光天气 阅读(30) 评论(0) 推荐(0)
摘要: 单点和双点的错误标签转化不成多边形,导致不能转化成实例分割的训练集所以在训练前需要去除掉 点击查看代码 import cv2 import numpy as np import json import os # 去除一两个点的小polygon def remove_specific_labels(j 阅读全文
posted @ 2024-12-19 10:02 阳光天气 阅读(249) 评论(0) 推荐(0)
摘要: 去除labelme空的标注文件和对应的图片 点击查看代码 import os import json def is_empty_labelme_file(file_path): with open(file_path, 'r') as f: data = json.load(f) # 检查图像数据是 阅读全文
posted @ 2024-12-06 11:10 阳光天气 阅读(163) 评论(0) 推荐(0)
摘要: 对于有些标注标签名拼写错误的,可以用此方法 点击查看代码 # -*- coding: utf-8 -*- import os import json json_dir = '' # JSON文件所在文件夹的路径 old_label = '' # 要修改的旧标签名 new_label = '' # 修 阅读全文
posted @ 2024-11-06 17:21 阳光天气 阅读(365) 评论(0) 推荐(0)
摘要: 前言 1、 ls -l|grep ^-| wc -l 含义:Linux操作系统下查看当前目录内的文件数量(不包含子目录中的文件)(因为目录的权限首字母为d:代表文件夹) 2、分段解释: ls -l :列出当前目录下所有文件。 grep ^-:grep用于筛选前面管道传来的信息,筛选标准:[行首后紧跟 阅读全文
posted @ 2024-11-04 11:52 阳光天气 阅读(498) 评论(0) 推荐(0)
摘要: Screen是一个全屏窗口管理器, 它在多个进程(通常是交互式shell)之间多路传输物理终端。 点击查看代码 # centos安装screen yum install -y screen # 在Ubuntu上安装并使用screen sudo apt update # 更新包列表 sudo apt 阅读全文
posted @ 2024-10-31 14:20 阳光天气 阅读(54) 评论(0) 推荐(0)
摘要: 一、查询与脚本有关的进程 用ps命令 在 Ubuntu 系统中,如果你想查询与特定 Python 脚本 abc.py 相关的线程,你可以使用 ps 命令和 grep 命令结合来查找。ps 命令用于显示当前运行的进程状态,而 grep 命令可以帮助你过滤出包含指定字符串的行。 步骤 打开终端。 输入以 阅读全文
posted @ 2024-10-29 11:47 阳光天气 阅读(268) 评论(0) 推荐(0)
摘要: 允许将任何指针转换为任何其他指针类型。 也允许将任何整数类型转换为任何指针类型以及反向转换。 语法: reinterpret_cast < type-id > ( expression ) 备注: 滥用 reinterpret_cast 运算符可能很容易带来风险。 除非所需转换本身是低级别的,否则应 阅读全文
posted @ 2024-10-21 17:03 阳光天气 阅读(139) 评论(0) 推荐(0)
摘要: 见代码 点击查看代码 import cv2 import os import numpy as np import base64 import json import shutil # labelme标注后的图片和json同步resize in_dir = r'D:\pic\2024demo03\b 阅读全文
posted @ 2024-10-21 10:31 阳光天气 阅读(114) 评论(0) 推荐(0)
摘要: 16位灰度图转RGB图 点击查看代码 import cv2 import numpy as np from PIL import Image def transfer_16bit_to_8bit(image_path): image_16bit=Image.open(image_path) img_ 阅读全文
posted @ 2024-10-11 16:03 阳光天气 阅读(174) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页