Profiling should be carried out whenever significant changes are made to the pipeline. Profiling results are saved as .txt and .prof files.
This script profiles SimSwap pipeline on a single image pair.
python profile_simswap.pyApart from analysing the .txt profiling data, we visualise and explore the .prof profiling data with:
- snakeviz: https://jiffyclub.github.io/snakeviz/
- gprof2dot: https://github.com/jrfonseca/gprof2dot
- flameprof: https://github.com/baverman/flameprof
conda install -c conda-forge snakevizsnakeviz <path/to/profiling_data>.prof --serverconda install graphviz
conda install -c conda-forge gprof2dotpython -m gprof2dot -f pstats <path/to/profiling_data>.prof | dot -Tpng -o <path/to/profiling_data>.pngpip install flameprofpython -m flameprof <path/to/profiling_data>.prof > <path/to/profiling_data>.svg