数据说明

测试集A与测试集B中提供*.jpg图片。

为便于参赛选手模型优化,特选取测试集10张图片给出参考答案:
0001 433
0002 121
0003 244
0004 131
0005 560
0006 1515
0007 507
0008 143
0009 936
0010 153

提交要求

初赛阶段

参赛者将结果以单个txt文件提交到平台,平台进行在线评分,实时排名。以截止日排名决出入围决赛的队伍;
在线评估提交限制:每个参赛团队每天最多提交3次结果文件,如果新提交结果好于之前提交结果,排行榜中的成绩将自动进行更新覆盖。

参赛者需要提交在TPU平台上对训练集进行推理后的结果文件,文件名为“val.txt”,使用UTF-8无BOM编码格式。推理结果需包括每张图片的序号、估计的人数、推理花费的时间。详情:
[val.txt文件]:
0001 280 880
0002 1300 980
0003 45 320

注释:每一行对应一张图片的推理结果,第一列为数据集中的图片序号,第二列是对该图片估计的人数,第三列是该图片推理花费的时间(以s为单位)。

• 复现阶段
初赛B榜TOP5队伍进入复现阶段,需要按照要求提交复现资料,复现结束后公布入围决赛团队名单。
参赛者需要提交能在BM1684平台上运行的bmodel模型及相应测试代码。详情:
1.测试代码应保存为tester.py格式
2.模型应保存为out.bmodel格式
3.测试代码和模型应置于同一文件夹下,将文件夹压缩成.zip文件后提交
[tester.py文件]
参赛者需要使用我们提供的统一的测试接口,测试接口模板如下:

class Tester:
    """Model inference and testing using SAIL
    """

    def __init__(self) -> None:
        """sail engine initialization"""
        self.engine = sail.Engine(args.model, 0, sail.IOMode.SYSIO)
        

    def test_one(self, img_pth):
        """predict number of people in the given image
        Args:
            img_pth: image path
        Returns:
            predicted number
        """


    def test_all(self):
        """test all images and save results"""
        with open(args.result, 'w') as out:
            with open(os.path.join(args.data, 'list.txt')) as f:
                for line in f.readlines():
                    img_id = line.split()[0]
                    img_pth = os.path.join(args.data, 'img_'+img_id + '.jpg')
                    time_start = time.time()
                    pred = self.test_one(img_pth)
                    time_cost = time.time() - time_start
                    print('{} {:.4f} {:.9f}'.format(img_id, pred, time_cost), file=out)
                    print('{} {:.4f}'.format(img_id, pred))
                    print('time cost {}'.format(time_cost))
         
tester = Tester()
tester.test_all()

评测标准

1. 通过Mean Absolute Error(MAE)、Mean Squared Error(MSE)和Normalized Absolute Error(NAE)三个指标评估模型精度

2. 通过模型推理时间itime评估模型性能,itime应为数据集图片推理的平均时间,单位为s。

3. 最终得分计算公式为:score=(250-mae score)*0.2+(500-rmse score)*0.1+(0.4-naescore)*200+(2-i time score)*100