vampire.model.initialize_model

vampire.model.initialize_model(model_name, num_points, num_clusters)[source]

Initialize the vampire model.

Parameters
model_namestr

Name of the model.

num_pointsint

Number of sample points of object contour.

num_clustersint

Number of clusters of K-means clustering.

Returns
modeldict

Contains information about the model. See notes.

Notes

The VAMPIRE model is contained the dict model, which is stored in a .pickle file named by the model name. The following can properties can be accessed as attributes or keys. For more information, see the VAMPIRE model.

model_namestr

Name of the model (build image set).

num_pointint

Number of points used to describe the contour.

num_clustersint

Number of cluster centers for K-means clustering.

num_pcint

Number of principal components used after truncation.

mean_registered_contourndarray

Mean registered contour.

mean_aligned_contourndarray

Mean aligned contour.

principal_directionsndarray

Principal direction of PCA.

centroidsndarray

Cluster center in K-means clustering.

build_contours_dfDataFrame

DataFrame of objects’ contour coordinates with cluster id.