YOLO v5 Series - Miscellaneous

List PT Datum

def listData(modelFile = checkFile):
    model = torch.load(modelFile, weights_only=False,  map_location='cpu')
    for key in model:
        node = model[key]
        print(key)
        if isinstance(node, dict):
            for subkey in node:
                print(key, subkey)
        subkey = 'names'
        if hasattr(node, subkey):
            print(key, subkey, node.names)

Update PT Datum

alpha = ['class-01', 'class-02', 'class-03', 'class-04', 'class-05', 'class-06', 'class-07', 'class-08', 'class-09']
def updateData(data, modelFile = checkFile):
    model = torch.load(modelFile, weights_only=False, map_location='cpu')
    model['model'].names = data
    torch.save(model, 'data/new_fireworks.pt')

在这里插入图片描述
statistic

 96x128 => 32*3  32*4  => Speed: 0.3ms pre-process, 50.0ms inference, 0.4ms NMS per image at shape (1, 3, 128, 128)
 96x160 => 32*3  32*5  => Speed: 0.3ms pre-process, 60.0ms inference, 0.4ms NMS per image at shape (1, 3, 160, 160)
128x192 => 32*4  32*6  => Speed: 0.2ms pre-process, 74.0ms inference, 0.5ms NMS per image at shape (1, 3, 192, 192)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值