-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: master
Are you sure you want to change the base?
Conversation
# 设置一些基本的配置 Settings | ||
RANK = -1 # int(os.getenv('RANK', -1)) | ||
matplotlib.rc("font", **{"size": 11}) | ||
# 如果这句话放在import matplotlib.pyplot as plt之前就算加上plt.show()也不会再屏幕上绘图 放在之后其实没什么用 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这句话有点奇怪
:params file: runs\detect\exp\crops\dog\bus.jpg | ||
:params gain: 1.02 xyxy缩放因子 | ||
:params pad: xyxy pad一点点边界框 裁剪出来会更好看 | ||
:params square: 是否需要将xyxy放缩成正方形 |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这一节我感觉可以单独做一节教程,就是我之前说过的那个:
2是解析一下one-yolov5训练的时候,train日志里面每张图代表什么以及细节(比如横纵坐标以及计算方法)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为这里的代码有点散,很难看得出来下去,如果结合每张图是用哪行画出来的方式就很容易接受了
Co-authored-by: Xiaoyu Zhang <35585791+BBuf@users.noreply.github.com>
Co-authored-by: Xiaoyu Zhang <35585791+BBuf@users.noreply.github.com>
No description provided.