Implementation of ZKML iris recognition, inspired by the worldcoin iris recognition pipeline.
Hardcode the path of your iris images in src/main.py (default uses samples)
Then to generate the iris code input ("input.json") for the ONNX model run (it will also perform the matching and ouput the distance in a non proved way) :
python src/main.pyFile proving/matching/input.json has been generated.
cd proving/matchingThe directory contains :
- network.onnx : the hamming distance onnx model
- input.json : the input of the model
- gen_calibration.py (optionnal, can be executed to generate calibration.json)
Install EZKL then
- Setup and prove :
ezkl gen-settings
ezkl compile-circuit
ezkl gen-witness
ezkl gen-srs
ezkl setup
ezkl proveInstall archon then :
- Create artifact :
archon create-artifact -a matching --data-path input.json --model-path network.onnx- Setup and prove :
archon job -a matching gen-settings
archon job -a matching compile-circuit
archon job -a matching gen-witness
archon job -a matching gen-srs
archon job -a matching setup
archon job -a matching prove