LabelImg 批量生成标注图片文件夹序号(起始值+终值)

# -*- coding: utf-8 -*-
"""
@File    : test.py
@Time    : 2020/7/7 9:58
@Author  : Dontla
@Email   : [email protected]
@Software: PyCharm
"""
# 图片起始序号
start = 11001
# 图片间隔
interval = 500
for i in range(8):
    print('{}-{}'.format(start + i * interval, start - 1 + (i + 1) * interval))

结果:

D:\dontla_python\python.exe C:/Users/Dontla/Desktop/batch_rename/test.py
11001-11500
11501-12000
12001-12500
12501-13000
13001-13500
13501-14000
14001-14500
14501-15000

Process finished with exit code 0

LabelImg 批量生成标注图片文件夹序号(起始值+终值)_第1张图片

你可能感兴趣的:(Python)