THU-MIG / RepViT

RepViT: Revisiting Mobile CNN From ViT Perspective [CVPR 2024] and RepViT-SAM: Towards Real-Time Segmenting Anything
https://arxiv.org/abs/2307.09283
Apache License 2.0
730 stars 55 forks source link

About Latency Measurement #13

Closed Jonydom closed 11 months ago

Jonydom commented 1 year ago

Your work is comprehensive, and I am very interested in the performance testing of RepViT inference speed. Could you please let me know what preparations are needed to reproduce the results locally?

jameslahm commented 1 year ago

Thanks. Here are the steps to measure the latency:

  1. Export the model to Core ML model
    python export_coreml.py --model repvit_m1 --ckpt pretrain/repvit_m1_distill_300.pth
  2. Measure its latency using the XCode performance tool like https://github.com/THU-MIG/RepViT#latency-measurement
Jonydom commented 1 year ago

Thanks. Here are the steps to measure the latency:

  1. Export the model to Core ML model
python export_coreml.py --model repvit_m1 --ckpt pretrain/repvit_m1_distill_300.pth
  1. Measure its latency using the XCode performance tool like https://github.com/THU-MIG/RepViT#latency-measurement

Thanks for your reply. Is there an open-source website or software available for XCode performance tool? Could you please provide a detailed introduction on how to use the XCode performance tool? Thank you very much for your information.

jameslahm commented 1 year ago

Thanks. You could refer to this video https://developer.apple.com/videos/play/wwdc2022/10027/ (starting at around the 4-minute mark).