This is an attempt to reproduce the ICRA 2023 paper "Deep Masked Graph Matching for Correspondence Identification in Collaborative Perception" by Peng Gao et al.
- Clone the main DMGM code from this repository into your workspace and install the Conda environment listed there
- Download their extended dataset (scenarios 1,3,4,5) here and extract each intersection folder into the base DMGM directory. Alternatively, you can create your own dataset by running the CARLA simulation
- Clone this repository into the DMGM folder then rename this repository as
reproduction. You should have a folder like this :DMGM/reproduction
- Once you have downloaded all of the datasets from the link above, run
get_databounds.pyandget_blacklist.pyfrom the DMGM folder. A folder calleddata_boundscontaining JSON files will be created inside thereproductionfolder. - Next, generate the dataset by running the
generate_dataset.py. This script creates the MAT files in the intersection folders which are necessary for training or testing the model. - The dataset then can be compiled into the
datafolder. Runcopy_dataset.pyto copy all of the MAT and PNG files inside eachintersection<id>folder into thedata/testdatafolder.
- Before training the model, it is necessary to split the dataset inside the
datafolder into training, testing, and validation sets. Runsplit_dataset.pyto randomly distribute every data instance fromDMGM/data/testdatatoDMGM/data/traindataandDMGM/data/valdata. - Run
train.pyto start training the model. When it is done, the model weight should appear in thecheckpointfolder with the namedmgm_trained.pt - To evaluate the model with
test_rural_ours.py, some adjustments to the code need to be done:- The
test_methodvariable should be initialized with'dmgm_trained.pt' - The iterator in
gps_noise_datasets_*should be changed tofor cat in os.listdir(in_path_*)as the data instances indata/testdataare now out of order.
- The
-
Before visualizing the model's performance, the split dataset must be unified into a single folder. To save storage space and preserve the previous dataset arrangement, a folder pointing to every data instances will be created using symlinks. Run
symlinks.pyto createDMGM/data/allfolder containg symlinks to every dataset in the other folders. -
Run
visualize.pyto start visualizing the model.
- Use
[or]key to switch between intersections. - Use the up or down arrow key to switch between scenarios.
- Use the left or right arrow to sweep through the timestamps.
- Hover any vehicle to see its ID and its HOG descriptors.
- Press the
ckey to toggle between RGB image and Depth image.
- The model converges very quickly. After a single epoch, the model has already plateaued and reached precision of the max f1 score: 0.73 and recall of the max f1 score: 0.89. Running 60 epochs was not necessary in my case
- The threshold value for the max f1 score is suspiciously significantly lower than what the original paper reported. The original was 0.13 whereas the reproduced threshold value is 0.01. It appears that the used dataset created a very confident model that doesn't need high softmax variance to infer covisibility.
