0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

第三章:训练图像估计光照度算法模型

Red Linux 来源:Red Linux 作者:Red Linux 2024-11-06 15:57 次阅读

前言

这一篇就到了图像估计光照度算法章节,这篇我主要记录如何使用 tensorflow2 训练一个从图片中估计光照度的算法。一般的流程是拍摄多张图片以及用光照度计来检测其光照度值,分别作为输入和输出。但是在本章呢,为了起到演示的作用,数据集我会使用 [MIT-Adobe FiveK Dataset] 。光照度值呢,我使用图片的 rgb 数值经过算法r0.2126+g0.7152+b*0.0722计算亮度。这样就有了一定数量的数据集。也就有基础进行后续的训练和测试了。下面准备进入正文。

数据获取

因为 MIT-Adobe FiveK Dataset 数据集包含了 5000 张原始 dng 图像和 5 和专家A,B,C,D,E进行处理之后的 tiff 图像(一般地,这个数据集是用来训练图像增强相关的模型的,我这里就用来训练光照度估计算法了,嘿嘿)。因为完整的数据压缩包太大了~50GB。受限电脑的容量和速度,我选择了使用脚本逐个下载这些图片(因为这些图片的下载路径有规律,再加上这些图片的名字在官网可以下载下来,所以脚本就读取包含图片名字的文件,然后逐个拼接下载路径,使用 curl 工具完成下载)。这里,我选择了下载原始 dng 图片和专家 C 的 tiff 图片。
下载 dng 原始文件的脚本是:

#!/usr/bin/bash

#改变当前工作路径
CURRENT_PATH="/home/red/Downloads/fivek_dataset/expertc"
#本文件所在路径
cd ${CURRENT_PATH}
#改变当前路径

#存储图像名称的list
img_lst=[]
#读取图片名列表
files_name=`cat filesAdobe.txt`
files_mit_name=`cat filesAdobeMIT.txt`

j=0
for i in ${files_name};do
    # https://data.csail.mit.edu/graphics/fivek/img/dng/a0001-jmac_DSC1459.dng
    URL='https://data.csail.mit.edu/graphics/fivek/img/dng/'${i}'.dng'
    file_cur=${URL##*/}
    echo "Downloading ${URL}@${j}"
    j=$((j+1))
    if [ -f ${file_cur} ];then
        echo "${file_cur} exist"
    else
        # echo "${file_cur} no exist, it's you"
        # break
        curl -O ${URL}
    fi
done

下载专家 C 处理后的文件脚本是:

#!/usr/bin/bash

#改变当前工作路径
CURRENT_PATH="/home/red/Downloads/fivek_dataset/expertc"
#本文件所在路径
cd ${CURRENT_PATH}
#改变当前路径

#存储图像名称的list
img_lst=[]
#读取图片名列表
files_name=`cat filesAdobe.txt`
files_mit_name=`cat filesAdobeMIT.txt`

j=0
for i in ${files_name};do
    #下载由 expert C 所调整的图像(可根据需要下载其它的四类图像)
    URL='https://data.csail.mit.edu/graphics/fivek/img/tiff16_c/'${i}'.tif'
    file_cur=${URL##*/}
    echo "Downloading ${URL}@${j}"
    j=$((j+1))
    if [ -f ${file_cur} ];then
        echo "${file_cur} exist"
    else
        echo "${file_cur} no exist, it's you"
        # break
        curl -O ${URL}
    fi
done

经过了好几天断断续续的下载,最后我一共得到了 1000 张左右图片。有了图片之后,下一步就是计算光照度了,这里使用 python 脚本和 pillow 包完成,为了后续移植到 AI300G 上,我将图片缩放到了统一的 255*255。并且将计算的光照度和图像的名称存储到一个 csv 文件。这部分脚本如下:

#!/bin/env python3

import sys
import csv
import os
import re

from PIL import Image

gs_illumiance_csv_file_fd=0
gs_illumiance_csv_file_name='illumiance_estimate.csv'
gs_illumiance_data_list=[['Name', 'Illuminance']]
DEST_DIR_NAME=r'PNG255'

def illuname_estimate(t):
    r,g,b=t
    return r*0.2126+g*0.7152+b*0.0722


def get_pic_pixels(pic_name):
    with Image.open(pic_name) as pic:
        ans=0
        pic=pic.resize((255,255))
        print(f'raw name:{pic_name}')
        match=re.match(r'w+/(S+).w+', pic_name)
        if match:
            basename=match.group(1)
            basename=DEST_DIR_NAME+'/'+basename+'.png'
            print(f'new name:{basename}')
            pic.save(basename)
            #  pic.show()
        width, heigh = pic.size
        for x in range(width):
            for y in range(heigh):
                r, g, b = pic.getpixel((x, y))
                ans=ans+illuname_estimate((r,g,b))

    # 光照度取整
    ans=round(ans)
    print(f'{pic_name}: illuname ans:{ans}')
    return ans

def insert_item(pic_name, illumiance_estimate):
    global gs_illumiance_csv_file_fd
    global gs_illumiance_csv_file_name
    global gs_illumiance_data_list
    item_template=['NONE', -1]
    item_template[0]=pic_name
    item_template[1]=illumiance_estimate
    gs_illumiance_data_list.append(item_template)

def do_with_dir(dir_name):
    for filename in os.listdir(dir_name):
        filepath=os.path.join(dir_name, filename)
        if (os.path.isfile(filepath)):
            print("do input %s" %(filepath))
            ans=get_pic_pixels(filepath)
            insert_item(filename, ans)
            #  return

if len(sys.argv) > 1:
    print("do input dir:%s" %(sys.argv[1]))
    if not os.path.exists(DEST_DIR_NAME):
        os.makedirs(DEST_DIR_NAME)
    do_with_dir(sys.argv[1])
    gs_illumiance_csv_file_fd=open(gs_illumiance_csv_file_name, 'w', newline='')
    csv.writer(gs_illumiance_csv_file_fd).writerows(gs_illumiance_data_list)
else:
    print("Please input pic name")

这样就得到了类似下面的数据集:

▸ head illumiance_estimate.csv
Name,Illuminance
a0351-MB_070908_006_dng.jpeg,3680630
a0100-AlexWed07-9691_dng.jpeg,1258657
a0147-kme_333.jpeg,5168820
a0261-_DSC2228_dng.jpeg,2571498
a0255-_DSC1448.jpeg,8747593
a0054-kme_097.jpeg,5351908
a0393-_DSC0040.jpeg,1783394
a0304-dgw_137_dng.jpeg,3118835
a0437-jmacDSC_0011.jpeg,6140107

至此有了一定数量的数据集(这里我使用了667张照片),接下来就是模型训练了。

模型训练

模型训练的基本思想就是,首先将数据集按比例(4:1)拆分为训练集和测试集,然后使用 tensorflow 建立模型训练参数进行检验。
大概流程是:

  1. 首先是根据 csv 文件建立 tensorflow dataset 格式的数据集;
  2. 建立模型使用数据集进行模型训练和测试

这部分代码为:

#!/usr/bin/python3.11

TF_ENABLE_ONEDNN_OPTS=0

import numpy as np
import os
import PIL
import PIL.Image
import tensorflow as tf
import pathlib
import csv
import pandas as pd
import tensorflow.data
import sys
import matplotlib.pyplot as plt

AUTOTUNE=tensorflow.data.AUTOTUNE
BATCH_SIZE=32
IMG_WIDTH=255
IMG_HEIGHT=255
ILLUMINACE_FILE=r'illumiance_estimate.csv'
print(tf.__version__)

import tensorflow as tf
import pandas as pd

image_count = len(os.listdir(r'JP'))
print(f'whole img count={image_count}')
# 假设CSV文件有两列:'image_path' 和 'label'
df = pd.read_csv(ILLUMINACE_FILE)

# 将DataFrame转换为TensorFlow可以处理的格式
image_paths = df['Name'].values
labels = df['Illuminance'].values
labels = labels.astype(np.float32)
labels /= 16777215.0

# 创建一个Dataset
gs_dataset = tf.data.Dataset.from_tensor_slices((image_paths, labels))

print(type(gs_dataset))
print(gs_dataset)
print(r'-------------------------------------------')
# 定义一个函数来加载和预处理图像
def load_and_preprocess_image(image_path, label):
    print(image_path)
    image_path='JP/'+image_path
    image = tf.io.read_file(image_path)
    image = tf.image.decode_jpeg(image, channels=3)
    image = tf.image.resize(image, [IMG_WIDTH, IMG_HEIGHT])
    #  image /= 255.0  # 归一化
    return image, label

# 应用这个函数到Dataset上
gs_dataset = gs_dataset.map(load_and_preprocess_image)
# 打乱数据
gs_dataset = gs_dataset.shuffle(image_count, reshuffle_each_iteration=False)

val_size = int(image_count * 0.2)

gs_train_ds = gs_dataset.skip(val_size)
gs_val_ds = gs_dataset.take(val_size)

def configure_for_performance(ds):
    ds = ds.cache()
    ds = ds.shuffle(buffer_size=1000)
    ds = ds.batch(BATCH_SIZE)
    ds = ds.prefetch(buffer_size=AUTOTUNE)
    return ds

gs_train_ds = configure_for_performance(gs_train_ds)
gs_val_ds = configure_for_performance(gs_val_ds)

image_batch, illuminance_batch = next(iter(gs_train_ds))

#  plt.figure(figsize=(10, 10))

#  for i in range(9):
  #  ax = plt.subplot(3, 3, i + 1)
  #  print(image_batch[i])
  #  #  img_data=image_batch[i].numpy()*255.0
  #  #  plt.imshow(img_data.astype("uint8"))
  #  plt.imshow(image_batch[i].numpy().astype("uint8"))
  #  illuminance = illuminance_batch[i]
  #  plt.title(illuminance.numpy())
  #  plt.axis("off")

#  plt.show()

#  sys.exit()

model = tf.keras.Sequential([
  tf.keras.layers.Rescaling(1./255),
  tf.keras.layers.Conv2D(32, (3,3), activation='relu', input_shape=(IMG_WIDTH, IMG_HEIGHT, 3)),
  tf.keras.layers.MaxPooling2D(2, 2),
  tf.keras.layers.Conv2D(64, (3, 3), activation='relu'),
  tf.keras.layers.MaxPooling2D(2, 2),
  tf.keras.layers.Conv2D(32, 3, activation='relu'),
  tf.keras.layers.MaxPooling2D(),
  tf.keras.layers.Flatten(),
  tf.keras.layers.Dense(128, activation='relu'),
  tf.keras.layers.Dense(1)
])

model.compile(
  optimizer='adam',
  loss='mean_squared_error')

model.fit(
  gs_train_ds,
  validation_data=gs_val_ds,
  epochs=12
)

model.save("illu_v01")

执行上述代码,可以看到最后的 loss 和 val_loss 为:

▸ ./train_tf2_v2.py
2024-08-08 13:41:48.341117: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-08-08 13:41:48.342596: I external/local_tsl/tsl/cuda/cudart_stub.cc:31] Could not find cuda drivers on your machine, GPU will not be used.
2024-08-08 13:41:48.363696: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-08-08 13:41:48.363729: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-08-08 13:41:48.364549: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-08-08 13:41:48.368601: I external/local_tsl/tsl/cuda/cudart_stub.cc:31] Could not find cuda drivers on your machine, GPU will not be used.
2024-08-08 13:41:48.368762: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-08-08 13:41:48.801750: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2.15.0
whole img count=667
2024-08-08 13:41:51.138713: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:901] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
2024-08-08 13:41:51.139135: W tensorflow/core/common_runtime/gpu/gpu_device.cc:2256] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
< class 'tensorflow.python.data.ops.from_tensor_slices_op._TensorSliceDataset' >
< _TensorSliceDataset element_spec=(TensorSpec(shape=(), dtype=tf.string, name=None), TensorSpec(shape=(), dtype=tf.float32, name=None)) >
-------------------------------------------
Tensor("args_0:0", shape=(), dtype=string)
Epoch 1/12
17/17 [==============================] - 11s 603ms/step - loss: 98.9302 - val_loss: 0.1012
Epoch 2/12
17/17 [==============================] - 8s 495ms/step - loss: 0.0493 - val_loss: 0.0043
Epoch 3/12
17/17 [==============================] - 8s 481ms/step - loss: 0.0078 - val_loss: 0.0043
Epoch 4/12
17/17 [==============================] - 8s 479ms/step - loss: 0.0025 - val_loss: 0.0040
Epoch 5/12
17/17 [==============================] - 8s 477ms/step - loss: 0.0023 - val_loss: 0.0029
Epoch 6/12
17/17 [==============================] - 8s 480ms/step - loss: 0.0021 - val_loss: 0.0028
Epoch 7/12
17/17 [==============================] - 8s 482ms/step - loss: 0.0020 - val_loss: 0.0028
Epoch 8/12
17/17 [==============================] - 8s 482ms/step - loss: 0.0019 - val_loss: 0.0027
Epoch 9/12
17/17 [==============================] - 8s 482ms/step - loss: 0.0018 - val_loss: 0.0026
Epoch 10/12
17/17 [==============================] - 8s 485ms/step - loss: 0.0017 - val_loss: 0.0026
Epoch 11/12
17/17 [==============================] - 8s 485ms/step - loss: 0.0015 - val_loss: 0.0023
Epoch 12/12
17/17 [==============================] - 8s 484ms/step - loss: 0.0011 - val_loss: 0.0020

并且模型也保存在了 illu_v01 目录。

▸ ls illu_v01/
assets  fingerprint.pb  keras_metadata.pb  saved_model.pb  variables

模型测试

现在有可模型,下面就是测试下自己的模型,使用下述 python 代码在 PC 端进行测试:

#!/usr/bin/python3.11

import numpy as np
import os
import PIL
import PIL.Image
import tensorflow as tf
import pathlib
import csv
import pandas as pd
import tensorflow.data
import sys
import matplotlib.pyplot as plt

IMG_WIDTH=255
IMG_HEIGHT=255

reload_model=tf.keras.models.load_model("illu_v01")
image_path=r'./JP/a0001-jmac_DSC1459.jpeg'
if len(sys.argv) < 2:
    print('Please input some pic to predict')
    sys.exit()
else:
    image_path=sys.argv[1]


image = tf.io.read_file(image_path)
image = tf.image.decode_jpeg(image, channels=3)
image = tf.image.resize(image, [IMG_WIDTH, IMG_HEIGHT])
image = tf.reshape(image, [1, IMG_WIDTH, IMG_HEIGHT, 3])

#  sys.exit()

predictions=reload_model.predict(image)
print(f'{image_path} ans={predictions*16777215}')

简单测试下模型:

check_tf2.py JP/a0001-jmac_DSC1459.jpeg
2024-08-08 13:57:08.263506: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-08-08 13:57:08.264895: I external/local_tsl/tsl/cuda/cudart_stub.cc:31] Could not find cuda drivers on your machine, GPU will not be used.
2024-08-08 13:57:08.285614: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-08-08 13:57:08.285646: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-08-08 13:57:08.286510: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-08-08 13:57:08.290464: I external/local_tsl/tsl/cuda/cudart_stub.cc:31] Could not find cuda drivers on your machine, GPU will not be used.
2024-08-08 13:57:08.290608: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-08-08 13:57:08.725843: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2024-08-08 13:57:11.051710: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:901] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
2024-08-08 13:57:11.051982: W tensorflow/core/common_runtime/gpu/gpu_device.cc:2256] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
1/1 [==============================] - 0s 57ms/step
JP/a0001-jmac_DSC1459.jpeg ans=[[check_tf2.py JP/a0001-jmac_DSC1459.jpeg
2024-08-08 13:57:08.263506: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-08-08 13:57:08.264895: I external/local_tsl/tsl/cuda/cudart_stub.cc:31] Could not find cuda drivers on your machine, GPU will not be used.
2024-08-08 13:57:08.285614: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-08-08 13:57:08.285646: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-08-08 13:57:08.286510: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-08-08 13:57:08.290464: I external/local_tsl/tsl/cuda/cudart_stub.cc:31] Could not find cuda drivers on your machine, GPU will not be used.
2024-08-08 13:57:08.290608: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-08-08 13:57:08.725843: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2024-08-08 13:57:11.051710: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:901] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
2024-08-08 13:57:11.051982: W tensorflow/core/common_runtime/gpu/gpu_device.cc:2256] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
1/1 [==============================] - 0s 57ms/step
JP/a0001-jmac_DSC1459.jpeg ans=[[5459503.]].]]

发现估计的光照度值是 5459503 和实际的 5363799 对比一下还是有15%左右的误差。但是目前为止,整个模型训练测试流程已经完成,下一步在是PC端模拟拉流使用模型对图像进行实时计算了,期待哦。

审核编辑 黄宇

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • 算法
    +关注

    关注

    23

    文章

    4598

    浏览量

    92613
  • 模型
    +关注

    关注

    1

    文章

    3158

    浏览量

    48700
收藏 人收藏

    评论

    相关推荐

    基于差分卷积神经网络的低照度车牌图像增强网络

    网络,将车牌的纹理信息解耦为水平垂直和对角线两个方向,对不同尺度空间的低照度图像进行纹理增强。为了避免增强结果局部过曝或低曝,该方法使用YCbCr颜色空间的损失函数来优化模型图像
    的头像 发表于 11-11 10:29 106次阅读
    基于差分卷积神经网络的低<b class='flag-5'>照度</b>车牌<b class='flag-5'>图像</b>增强网络

    AI大模型训练数据来源分析

    学术机构、政府组织或企业公开发布,涵盖了各种类型的数据,如图像、文本、音频、视频等。例如: ImageNet :一个广泛用于图像识别任务的大规模图像数据集。 Common Crawl :提供了大量的网页抓取数据以供自然语言处理
    的头像 发表于 10-23 15:32 342次阅读

    索尼FCB-EV9500M的星光级低照度

    SONY FCB-EV9500M一体化摄像机模组搭载了先进的图像传感技术和图像处理算法,能够在极低的光照条件下依然呈现出清晰、细腻的画质,在0.009Lx低
    的头像 发表于 10-18 18:10 215次阅读
    索尼FCB-EV9500M的星光级低<b class='flag-5'>照度</b>

    如何训练ai大模型

    训练AI大模型是一个复杂且耗时的过程,涉及多个关键步骤和细致的考量。 一、数据准备 1. 数据收集 确定数据类型 :根据模型的应用场景,确定需要收集的数据类型,如文本、图像、音频等。
    的头像 发表于 10-17 18:17 614次阅读

    【「嵌入式Hypervisor:架构、原理与应用」阅读体验】+第三四章阅读报告

    在深入阅读了《嵌入式Hypervisor:架构、原理与应用》的第三、四后,我对嵌入式Hypervisor的设计与实现技术有了更为详尽和系统的理解。以下是我对这两内容的阅读报告: 第三章
    发表于 10-09 18:29

    《DNK210使用指南 -CanMV版 V1.0》第三章 CanMV简介

    第三章 CanMV简介 本章将对CanMV进行简单介绍本章分为如下几个小节:3.1 初识CanMV 3.2 CanMV的应用开发方式 3.1 初识CanMVCanMV是嘉楠科技针对AIOT编程
    发表于 09-03 10:13

    迅为电子RK3588S开发板第三章Buildroot系统功能测试

    迅为电子RK3588S开发板第三章Buildroot系统功能测试
    的头像 发表于 09-02 14:45 661次阅读
    迅为电子RK3588S开发板<b class='flag-5'>第三章</b>Buildroot系统功能测试

    人脸识别模型训练流程

    据准备阶段,需要收集大量的人脸图像数据,并进行数据清洗、标注和增强等操作。 1.1 数据收集 数据收集是人脸识别模型训练的第一步。可以通过网络爬虫、公开数据集、合作伙伴等途径收集人脸图像
    的头像 发表于 07-04 09:19 811次阅读

    人脸识别模型训练是什么意思

    人脸识别模型训练是指通过大量的人脸数据,使用机器学习或深度学习算法训练出一个能够识别和分类人脸的模型。这个
    的头像 发表于 07-04 09:16 459次阅读

    深度学习模型训练过程详解

    深度学习模型训练是一个复杂且关键的过程,它涉及大量的数据、计算资源和精心设计的算法训练一个深度学习模型,本质上是通过优化
    的头像 发表于 07-01 16:13 1063次阅读

    求助,关于OP191输出波形的问题求解

    下载了官网的OP191的SPICE模型,用LTspice进行仿真,原理图和仿真结果如下:我的疑问就是第三章图中,当Vin=0的时候,Vout≠0,仿真结果是15mV左右,这个是怎么回事?谢谢
    发表于 05-20 07:37

    【大语言模型:原理与工程实践】大语言模型的预训练

    训练数据时,数量、质量和多样性者缺一不可。 数据的多样性对于大语言模型至关重要,这主要体现在数据的类别和来源两个方面。丰富的数据类别能够提供多样的语言表达特征,如官方知识型数据、口语化表达的论坛
    发表于 05-07 17:10

    如何使用Python进行图像识别的自动学习自动训练

    如何使用Python进行图像识别的自动学习自动训练? 使用Python进行图像识别的自动学习和自动训练需要掌握一些重要的概念和技术。在本文中,我们将介绍如何使用Python中的一些常用
    的头像 发表于 01-12 16:06 534次阅读

    【飞腾派4G版免费试用】第三章:抓取图像,手动标注并完成自定义目标检测模型训练和测试

    抓取图像,手动标注并完成自定义目标检测模型训练和测试 在第二中,我介绍了模型训练的一般过程,其
    发表于 12-16 10:05

    【飞腾派4G版免费试用】 第三章:抓取图像,手动标注并完成自定义目标检测模型训练和测试

    本章记录了如何从网上抓取素材并进行标注,然后训练,导出测试自己的模型
    的头像 发表于 12-16 09:55 566次阅读
    【飞腾派4G版免费试用】 <b class='flag-5'>第三章</b>:抓取<b class='flag-5'>图像</b>,手动标注并完成自定义目标检测<b class='flag-5'>模型</b><b class='flag-5'>训练</b>和测试