You can download from the link below a sample code for "Counting and detecting figures using persistent homology".
Please cite the following article when you use this code.
Haruhisa Oda. Counting and detecting figures using persistent homology. JSIAM Letters 15 (2023) 33-36.
Link for the sample code:
https://drive.google.com/file/d/1-N7T68UbpWW_yQ-Ttvst5w1wqXNRiPTD/view?usp=sharing