【发布时间】:2019-11-08 01:44:45
【问题描述】:
您好,我目前正在以下列方式转储每帧图像矩阵的输出。我
with open(os.path.join('logs', 'frame_{0}_keypoints.json'.format(str(frame_number).zfill(12))).format(frame_dict), 'w') as outfile:
json.dump(my_dict, outfile)
有了这个,我可以得到 json 每帧文件,格式为 frame_000000000001_keypoints ,我想知道是否有办法将时间戳附加到日志?比如20190607T220005YearMonthDayTimeinHoursMinutesSeconds??
【问题讨论】:
-
哪些日志?时间戳与图像处理有什么关系(给定标签)?
-
将
import time; time.asctime()添加到您的字典中。 -
你的意思是我应该附加它吗?
-
@timtensor 是否要向
my_dict添加新属性?时间戳? -
不是
my_dict,而是每帧输出的文件名。文件名的命名
标签: python json python-3.x logging