比较字典的不同 python
import os
from argparse import ArgumentParser
import pickle
import cv2
import numpy as np
import mmengine
import sys
os.chdir(os.path.dirname(os.path.abspath(__file__)))
from deepdiff import DeepDiff
pkl_files=['LW433B123N1014599_1706703947798_01_130_1706703938351.pkl','LW433B123N1014599_1706703947798_01_133_1706703938458.pkl']
with open('LW433B123N1014599_1706703947798_01_130_1706703938351.pkl', 'rb') as f:
dict1 = pickle.load(f)
with open('LW433B123N1014599_1706703947798_01_133_1706703938458.pkl', 'rb') as f:
dict2 = pickle.load(f)
# dict1 = {'a': 1, 'b': {'x': 10, 'y': 20}, 'c': 3}
# dict2 = {'a': 1, 'b': {'x': 10, 'y': 25}, 'd': 4}
diff = DeepDiff(dict1, dict2)
print(diff)