Coder Social home page Coder Social logo

train_custom_dataset's Introduction

子豪兄带你两天搞定AI毕业设计

标注自己的数据集,训练、评估、测试、部署自己的人工智能算法

作者:同济子豪兄 https://space.bilibili.com/1900783

代码测试云GPU环境:GPU RTX 3060、CUDA v11.2

本教程的数据集、代码、视频,倾注了子豪兄大量时间和心血。如果知识付费,卖两三千并不为过,但本着开源分享精神,全部免费开源,但仅可用于教学、科研、科普等非盈利用途,并需在转载引用时注明出处。

计算机视觉解决的基本问题

优雅地感谢子豪兄

图像分类

构建自己的图像分类数据集

收集图像、下载样例数据集,删除系统多余文件,划分训练集、测试集,统计图像尺寸、比例分布、拍照地点位置分布,统计各类别图像数量

https://www.bilibili.com/video/BV1Jd4y1T7rw

【Pytorch】ImageNet预训练图像分类模型预测

使用Pytorch自带的预训练图像分类模型,分别对单张图像、视频、摄像头实时画面运行图像分类预测

https://www.bilibili.com/video/BV1qe4y1D7zD

【Pytorch】迁移学习Fine-tuning训练自己的图像分类模型

https://www.bilibili.com/video/BV1Ng411C7WY

【Pytorch】用训练得到的pytorch图像分类模型,识别图像、视频、摄像头画面

https://www.bilibili.com/video/BV12d4y1P7xz

测试集评估

计算各类别分类评估指标,绘制混淆矩阵、PR曲线、ROC曲线。

https://www.bilibili.com/video/BV1bP411j7NK

测试集语义特征降维可视化

抽取Pytorch训练得到的图像分类模型中间层的输出特征,作为输入图像的语义特征。计算测试集所有图像的语义特征,使用t-SNE和UMAP两种降维方法降维至二维和三维,可视化。

https://www.bilibili.com/video/BV1VB4y1z7xN

可解释性分析、显著性分析

CAM热力图系列算法:https://www.bilibili.com/video/BV1JG4y1s74x

答疑交流群

子豪兄图像分类答疑交流群(有问必答)

单目标追踪(蜜蜂追踪)

https://www.bilibili.com/video/BV1za411Y7Zm

视频人流量计数+足迹追踪

https://www.bilibili.com/video/BV1za411Y7Zm

大模型摘要生成

https://www.bilibili.com/video/BV1W44y1g7cB

CycleGAN图像风格迁移

https://www.bilibili.com/video/BV1wv4y1T71F

OCR文字识别

https://www.bilibili.com/video/BV1Ua411x7dB

train_custom_dataset's People

Contributors

ethan-chen-plus avatar tommyzihao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

train_custom_dataset's Issues

yolov8关键点检测

大佬,请问一下,你进行的三角板关键点检测结果如何?我用yolov8的pose-n进行关键点检测,结果偏差有点大,而且出现关键点在box的外面这种情况啊?我应该怎么进行调整呢?

2023-10-08 14-53-13屏幕截图
2023-10-08 14-54-00屏幕截图

化繁为简

部署那步,能不能重新设计一下,把pytorch去掉,把onnxruntime也去掉,仅用OpenCV解决问题,用OpenCV的dnn读取并解析onnx文件。

請問區域計數

你好
想請問你的代碼,能否用yolov8加入它本身有提供bytetrack追蹤功能?

另外,區域計數能否跟越線那樣 數字只會越來越大(累計功能) 而非只數區域內的數量
謝謝

关键点检测-3-c1出现的bug

bboxes_keypoints = results[0].keypoints.cpu().numpy().astype('uint32')
在使用时会发生error,这里应当在keypoints后边加一个.data操作
即仅需要keypoints里边的data数据(可进行print发现)

Overload resolution failed error

十分感谢分享。 在使用 https://github.com/TommyZihao/Train_Custom_Dataset/blob/main/%E5%9B%BE%E5%83%8F%E5%88%86%E7%B1%BB/6-%E5%8F%AF%E8%A7%A3%E9%87%8A%E6%80%A7%E5%88%86%E6%9E%90%E3%80%81%E6%98%BE%E8%91%97%E6%80%A7%E5%88%86%E6%9E%90/4.shap%E5%B7%A5%E5%85%B7%E5%8C%85/%E3%80%90C2%E3%80%91Pytorch-%E6%B0%B4%E6%9E%9C%E5%9B%BE%E5%83%8F%E5%88%86%E7%B1%BB%E5%8F%AF%E8%A7%A3%E9%87%8A%E6%80%A7%E5%88%86%E6%9E%90.ipynb 这里的code的时候,第58行
shap_values = explainer(input_img, max_evals=n_evals, batch_size=batch_size, outputs=[28])
出现,这样的报错:
error: OpenCV(4.6.0) 👎 error: (-5:Bad argument) in function 'blur'

Overload resolution failed:

  • src is not a numpy array, neither a scalar
  • Expected Ptrcv::UMat for argument 'src'

在我自己做的notebook里也有这个问题。 测试下来可能是 Xtr[0].shape 的类型问题。

还麻烦子豪兄再运行一遍,看会不会报同样的错误。

感谢子豪导师

催更催更语义分割,让我这个本科生体验体验快乐!!太感谢了

'Keypoints' object has no attribute 'astype'. See valid attributes below.

【C1】YOLOV8预训练模型预测-Python API-图像.ipynb
AttributeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 bboxes_keypoints = results[0].keypoints.cpu().numpy().astype('uint32')

/usr/local/lib/python3.10/dist-packages/ultralytics/utils/init.py in getattr(self, attr)
151 """Custom attribute access error message with helpful information."""
152 name = self.class.name
--> 153 raise AttributeError(f"'{name}' object has no attribute '{attr}'. See valid attributes below.\n{self.doc}")
154
155

AttributeError: 'Keypoints' object has no attribute 'astype'. See valid attributes below.

A class for storing and manipulating detection keypoints.

Attributes:
    xy (torch.Tensor): A collection of keypoints containing x, y coordinates for each detection.
    xyn (torch.Tensor): A normalized version of xy with coordinates in the range [0, 1].
    conf (torch.Tensor): Confidence values associated with keypoints if available, otherwise None.

Methods:
    cpu(): Returns a copy of the keypoints tensor on CPU memory.
    numpy(): Returns a copy of the keypoints tensor as a numpy array.
    cuda(): Returns a copy of the keypoints tensor on GPU memory.
    to(device, dtype): Returns a copy of the keypoints tensor with the specified device and dtype.

append方法失效

大佬!!在代码中append方法已经用不了了怎么办?df = df.append({'类别':fruit, '文件名':file, '图像宽':img.shape【1】, '图像高':img.shape【0】}, ignore_index=True)

想提个Pr

您好,我根据您的关键点检测代码以及开源社区提供的思路,实现了一个指定区域的目标检测。
此代码可对指定区域进行目标检测,指定区域之外内容不检测,可用于电子围栏,区域入侵检测等场景。代码实现了网络摄像头的调用以及实时推理。
但是,Pr功能好像被关掉了,这让我我没有办法和大家一起分享。

一个小bug

子豪兄你好,很感谢你无私分享ai干货,我在学习你的代码时发现一个小bug。
在关键点检测-3-YOLOV8关键点检测-预训练模型预测-【c1】YOLOV8预训练模型预测-Python API-图像.ipynb文件中 In[25]中,代码:
# 获取框的预测类别(对于关键点检测,只有一个类别)
bbox_label = results[0].names[0]
results[0].names获取的是coco.yaml文件中所有names的数组形式,所以results[0].names[0]这种取值方式获取到的不是结果类别,而永远是names数组中的第一个对象,也就是person。

我使用以下代码进行了修改:
proto = tf.make_tensor_proto(results[0].boxes.cls)
array = tf.make_ndarray(proto)
bbox_label = results[0].names[array[idx]]
以获取到获取框的预测类别

关键点偏移

image 请问大佬们,人体姿态关键点只有一个关键点偏移,这是绘图的问题还是模型预测的问题呢?应该怎么修改呢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.