githubEdit

Model analysis

Model analysis

ML Model Analysis

Model Investigation

Using Keras

from tensorflow import keras
from keras.models import load_model

model = load_model("example.h5")

# Summarization
print(model.summary())

# Configuration
print(model.get_config())

# List inputs
print(model.inputs)
# List outputs
print(model.outputs)

Using PyTorch

If we don’t have torchinfo, we need to install it at first.

Here is the code for investigation.

Scan Model

ModelScan

ModelScanarrow-up-right is a machine learning model scanner to protect againt Model Serialization Attacks.

Model Fingerprinting

Reference: Cruciblearrow-up-right

When we don't know which model is being used, we can use various approaches to identify it.

For Image Recognition Models

  • Input an image that is rotated.

  • Input an image that is changed its color.

  • Input random images.

  • Replicate a model from ImageNet because many image recognition models are based on ImageNet.

References

Last updated