fixed error when comparing lists with nana

This commit is contained in:
davidpagnon 2024-03-05 01:35:06 +01:00
parent 66df6bbd7c
commit 3ffd39fe17
2 changed files with 5 additions and 5 deletions

View File

@ -317,10 +317,10 @@ def best_persons_and_cameras_combination(config, json_files_framef, personsIDs_c
comb_ok = np.concatenate((comb_ok, [comb[0]])) comb_ok = np.concatenate((comb_ok, [comb[0]]))
except: except:
break break
sorted_pruned_idx = [comb_errors_below_thresh.index(c.tolist()) for c in comb_ok] sorted_pruned_idx = [i for i, x in enumerate(comb_errors_below_thresh) for c in comb_ok if np.array_equal(x,c,equal_nan=True)]
errors_below_thresh = np.array(errors_below_thresh_sorted)[sorted_pruned_idx] errors_below_thresh = np.array(errors_below_thresh_sorted)[sorted_pruned_idx].tolist()
comb_errors_below_thresh = np.array(comb_errors_below_thresh)[sorted_pruned_idx] comb_errors_below_thresh = np.array(comb_errors_below_thresh)[sorted_pruned_idx].tolist()
Q_kpt = Q_kpt[sorted_pruned_idx] Q_kpt = Q_kpt[sorted_pruned_idx].tolist()
# Remove indices already used for a person # Remove indices already used for a person
personsIDs_combinations = np.array([personsIDs_combinations[i] for i in range(len(personsIDs_combinations)) personsIDs_combinations = np.array([personsIDs_combinations[i] for i in range(len(personsIDs_combinations))

View File

@ -32,7 +32,7 @@ zip_safe = False
python_requires = >=3.8 python_requires = >=3.8
install_requires = install_requires =
toml toml
numpy numpy>=1.19
opencv-python opencv-python
lxml lxml
matplotlib matplotlib