- 博客(4)
- 收藏
- 关注
原创 os.path.join解读
>>> import os>>> img_file = os.path.join('D:\\', 'data/GTA5','images/00001.png')img_file>>> 'D:\\data/GTA5\\images/00001.png'
2021-09-02 21:51:21 226
原创 numpy.ceil()函数的解读
函数用法np.ceil(): 计算各元素的ceiling,对元素向上取整。代码示例 >>> import numpy as np>>>a=np.array([2.5,3.4,5.7,-1.2,-3.5,-3.8,6])>>>a1 = np.ceil(a)>>>a1array([ 3., 4., 6., -1., -3., -3., 6.]) ...
2021-09-02 21:15:05 5152
原创 i_id.strip()理解
1.self.img_ids = [i_id.strip() for i_id in open(list_path)]在图像分割训练中,在list_path对应文件中读取图片的id.下面是存储图片id的txt文件for i_id in open(list_path)将id读取出来,如下图2 strip() 函数strip() 方法用于移除字符串头尾指定的字符(默认为空格或换行符)或字符序列。...
2021-09-02 21:04:39 820
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人