Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source_code_interpretation/plots_py.md #49

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ccssu
Copy link
Contributor

@ccssu ccssu commented Nov 29, 2022

No description provided.

# 设置一些基本的配置 Settings
RANK = -1 # int(os.getenv('RANK', -1))
matplotlib.rc("font", **{"size": 11})
# 如果这句话放在import matplotlib.pyplot as plt之前就算加上plt.show()也不会再屏幕上绘图 放在之后其实没什么用
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这句话有点奇怪

docs/source_code_interpretation/utils/plots_py.md Outdated Show resolved Hide resolved
docs/source_code_interpretation/utils/plots_py.md Outdated Show resolved Hide resolved
:params file: runs\detect\exp\crops\dog\bus.jpg
:params gain: 1.02 xyxy缩放因子
:params pad: xyxy pad一点点边界框 裁剪出来会更好看
:params square: 是否需要将xyxy放缩成正方形
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

什么叫把xyxy放缩成正方形,可以解释一下

# https://pytorch.org/docs/stable/generated/torch.Tensor.view.html?highlight=torch+view#torch.Tensor.view
# 其实按照我们通俗的理解就是reshape,
# 只不过这里是reshape的是张量,也就是将张量重新调整为自己想要的维度(形状大小)
xyxy = flow.tensor(xyxy).view(-1, 4) # list -> Tensor [1, 4] = [x1 y1 x2 y2]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个tensor的维度是[1, 4]还是[bs, 4],意思是这个函数的输入只有一个bbox还是可以有很多个bbox呢?

# pd.DataFrame: 创建DataFrame, 类似于一种excel, 表头是['x', 'y', 'width', 'height'] 表格数据: b中数据按行依次存储
x = pd.DataFrame(b.transpose(), columns=["x", "y", "width", "height"])

# seaborn correlogram
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这一节我感觉可以单独做一节教程,就是我之前说过的那个:

2是解析一下one-yolov5训练的时候,train日志里面每张图代表什么以及细节(比如横纵坐标以及计算方法)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为这里的代码有点散,很难看得出来下去,如果结合每张图是用哪行画出来的方式就很容易接受了

ccssu and others added 2 commits February 1, 2023 19:35
Co-authored-by: Xiaoyu Zhang <35585791+BBuf@users.noreply.github.com>
Co-authored-by: Xiaoyu Zhang <35585791+BBuf@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants