HBSGSep (Hierarchical Bayesian Star-Galaxy Separations) classifies stars and galaxies photometrically by fitting templates and hierarchically learning their prior weights. The hierarchical Bayesian algorithms are unsupervised and do not use a training set nor are priors set in advance of running the algorithms; the priors for the templates are inferred from the data themselves.