Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
amumu1843 46a643b252 | 9 months ago | |
---|---|---|
submission_example | 10 months ago | |
README.md | 9 months ago | |
utils.py | 9 months ago |
The dataset contains over 25k <image, annotation> pairs from both day and night scenes, and we take approximately 16k as training set, 4k as validation set, and 5k as testing set. Five classes are annotated in the dataset, including Pedestrian, Cyclist, Car, Truck and Tram. The number of objects from each class is listed in the table below.
Pedestrian | Cyclist | Car | Truck | Tram | |
---|---|---|---|---|---|
Training set | 23809 | 11658 | 115069 | 7766 | 6464 |
Validation set | 2521 | 1622 | 24824 | 2874 | 1209 |
Testing set | 3752 | 3569 | 24246 | 3476 | 1249 |
Downloading from OpenI sometimes is unstable. Thus, we provide alternative downloading links upon Baidu Cloud Disk.
The entire script for loading data and other utilities can be found in this script.
Here is an example of how to load the original raw images (in .raw
format) and annotations.
import os
import json
import numpy as np
BIT8, BIT16, BIT24 = 2 ** 8, 2 ** 16, 2 ** 24
def load_raw(name):
assert os.path.exists(name) and name.endswith('.raw'), \
f'Invalid raw name < {name} >!'
raw = np.fromfile(name, dtype=np.uint8)
raw = raw.reshape(1856, 2880, 3).astype(np.float32)
raw = np.split(raw, 3, axis=2)
raw = (raw[0] + raw[1] * BIT8 + raw[2] * BIT16) # shape [1856, 2880, 1]
return raw / (BIT24 - 1) # norm to range [0, 1]
def load_anno(name):
assert os.path.exists(name) and name.endswith('.json'), \
f'Invalid annotation name < {name} >!'
with open(name) as f: data = json.load(f)
for obj in data['shapes']:
klass = obj['label'] # object class
xmin, ymin = obj['points'][0] # bounding box
xmax, ymax = obj['points'][1] # bounding box
assert 0 <= xmin < xmax <= 2880
assert 0 <= ymin < ymax <= 1856
Then for submission on our Challenge Homepage, please use the following codes for loading raws. There is a 12MB limit for each image on the testing platform, and the original raws in .raw
format is too large (15MB, which is over the limit). Thus, we losslessly compress raws into .npz
format. Example codes are as follows.
import os
import numpy as np
BIT8, BIT16, BIT24 = 2 ** 8, 2 ** 16, 2 ** 24
def raw2npz(name):
assert os.path.exists(name) and name.endswith('.raw'), \
f'Invalid raw name < {name} >!'
raw = np.fromfile(name, dtype=np.uint8).reshape(1856, 2880, 3)
save_name = name.replace('.raw', '.npz')
np.savez_compressed(save_name, raw)
def load_npz(name):
assert os.path.exists(name) and name.endswith('.npz'), \
f'Invalid npz name < {name} >!'
raw = np.load(name)['arr_0'].astype(np.float32) # shape [1856, 2880, 3]
raw = np.split(raw, 3, axis=2)
raw = (raw[0] + raw[1] * BIT8 + raw[2] * BIT16) # shape [1856, 2880, 1]
return raw / (BIT24 - 1)
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》