# demo **Repository Path**: binsc/demo ## Basic Information - **Project Name**: demo - **Description**: demo - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-13 - **Last Updated**: 2026-05-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #### 一 ![输入图片说明](img_1.png) #### 二 ``` import cv2 import matplotlib.pyplot as plt img = cv2.imread('./data-aug/cat.png') #img = <1> img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) #垂直翻转 #img_flip = <2> img_flip = cv2.flip(img, 0) #<3> plt.imshow(img_flip) plt.axis('off') plt.show() #保存到2-1.png ``` ``` import cv2 import matplotlib.pyplot as plt img = cv2.imread('./data-aug/cat.png') #img = <1> img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) #图像缩放 #result = <2> result = cv2.resize(img, (100, 100)) #<3> print(f'缩放后的尺寸:{result.shape[1]} x {result.shape[0]}') #<4> plt.imshow(result) plt.axis('off') plt.show() # 保存到2-2.png ``` #### 三 ``` import pandas as pd # 读取CSV文件为DataFrame对象 df = pd.read_csv('comment.csv') # 使用duplicated()方法检查是否存在重复行,并返回布尔系列 #duplicates = <1> duplicates = df.duplicated() # 打印重复行的行数据 display(df[duplicates]) #保存到3-1.png ``` ``` import pandas as pd # 读取CSV文件为DataFrame对象 df = pd.read_csv('comment.csv') # 使用drop_duplicates()方法删除重复行,返回删除重复行后的DataFrame对象 #df_clean = <2> df_clean = df.drop_duplicates() display(df_clean) #保存到3-2.png ``` ``` import pandas as pd # 读取CSV文件为DataFrame对象 df = pd.read_csv('comment.csv') # 使用drop_duplicates()方法删除重复行,返回删除重复行后的DataFrame对象 #df_clean = <3> df_clean = df.drop_duplicates() # 将删除重复行后的DataFrame对象保存为新的CSV文件 #<4> df_clean.to_csv('comment_cleaned.csv') ``` #### 四 ``` from imutils import paths import matplotlib.pyplot as plt import numpy as np import cv2 import os imagePaths = list(paths.list_images("dataset")) print('打印所有图片路径:') for i, path in enumerate(imagePaths): print(f"{i}.{path}") print(f"总共找到{len(imagePaths)}张图片") # 保存在4-1.png ``` ``` from imutils import paths import matplotlib.pyplot as plt import numpy as np import cv2 import os imagePaths = list(paths.list_images("dataset")) #设置data和labels data = [] labels = [] for imagePath in imagePaths: #label = <1> # os.path.sep 路径分隔符 label = imagePath.split(os.path.sep)[-2] #image = <2> image = cv2.imread(imagePath) #image = <3> image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) #image = <4> imge = cv2.resize(image, (100, 100)) data.append(image) labels.append(label) #对图像数据转换为array格式并进行归一化处理,并打印 #<5> print(f'所有标签列表:') print(labels) # 保存到4-2.png ``` ``` import matplotlib.pyplot as plt import numpy as np import cv2 import os imagePaths = list(paths.list_images("dataset")) #设置data和labels data = [] labels = [] for imagePath in imagePaths: #label = <1> # os.path.sep 路径分隔符 label = imagePath.split(os.path.sep)[-2] #image = <2> image = cv2.imread(imagePath) #image = <3> image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) #image = <4> image = cv2.resize(image, (100, 100)) data.append(image) labels.append(label) #将标签数据转换为array格式,并打印 #<5> label_arr = np.array(labels) print(f'数据类型:{type(label_arr)}, 数组大小:{label_arr.shape}') print(label_arr) # 保存在4-3.png ``` #### 六 | 槽位描述 | 类型 | 字段名 | 举例 | 槽位类型 | |--------|-------|-------------|--------|--------| | **提醒时间** | **必填** | remind_time | 明天下午2点 | 时间日期 | | 重复周期 | 非必填 | **repeat** | 每周一 | 重复时间 | | 内容 | 非必填 | title | 团建活动组织 | Null | | **提醒方式** | **非必填** | remind_type | 短信提醒 | 提醒方式列表 | ``` xxx项目xxx ``` #### 七 一、培训目的 参考2021年颁布的《人工智能训练师国家职业技能标准》,结合我司实际要求进行编写。通过培训,使新入职员工掌握基础的数据处理理论和操作技能,为尽快掌握公司业务打下良好的基础。 二、培训对象 本季度入职新员工08306555539 三、培训内容 | 工作内容 | 知识点 | 预计课时 | |----------|--------------|------| | 业务数据处理 | 制定数据处理规范 | 8 | |----------| 业务数据汇总、整理归类 |----------| | 业务数据质量检测 | 对预处理后的数据进行审核 | 4 | | 数据处理方法优化 | 优化数据处理流程 | 4 | ![输入图片说明](img-7.png) 四、考核方式 考核方式分为理论考试和技能操作考核。理论考试采用闭卷笔试方式,技能操作考核采用现场实际操作方式。理论考试和技能操作考核均实行百分制,成绩皆达60分以上者为为合格。