How to use a pretrained model in BEAT platform

14 views
Skip to first unread message

Amir Mohammadi

unread,
May 27, 2020, 10:16:11 AM5/27/20
to Joseph McGrath, beat-...@googlegroups.com
Hi Joesph,

You cannot upload a file to the BEAT platform.
You can create a Python/C++ algorithm though and when you are writing that, you can put the model as a string there to be loaded.
You can look at the file that I have attached for an example.

Best,
Amir

On May 26 2020, at 7:51 pm, Joseph McGrath <jmcg...@alumni.nd.edu> wrote:
Hi Amir,

I have another question that you may be able to help me with. What is the procedure for using pretrained models on the BEAT platform? It seems as though the convention for the platform is to train and test the model within the same experiment, but with LiveDet-Iris 2020 I believe the plan is to only test the models on BEAT.

Joseph

pickled_model.png

Joseph McGrath

unread,
May 30, 2020, 3:05:46 PM5/30/20
to beat-devel
To add to this for anyone interested in using OpenCV on the platform, here is how you would load a model directly from a string:

svm_11_12_file = cv.FileStorage(models.get_svm_11_12(),cv.FileStorage_READ | cv.FileStorage_MEMORY)
svm_11_12 = cv.ml.SVM_create()
svm_11_12.read(svm_11_12_file.getFirstTopLevelNode())

In this example, models.get_svm_11_12() returns the XML for the model as a string.
Reply all
Reply to author
Forward
0 new messages