We determine an absolute calibration of stellar mass-to-light ratios for the densest ≃3 per cent of early-type galaxies in the local Universe (redshift z≃ 0.08) from Sloan Digital Sky Survey (SDSS) Data Release 7. This sample of ∼4000 galaxies has, assuming a Chabrier initial mass function (IMF), effective stellar surface densities Σe > 2500 M⊙ pc−2, stellar population synthesis (SPS) stellar masses log10(MSPS/M⊙) < 10.8 and aperture velocity dispersions of (68 per cent range). In contrast to typical early-type galaxies, we show that these dense early-type galaxies follow the virial Fundamental Plane, which suggests that mass follows light. With the additional assumption that any dark matter does not follow the light, the dynamical masses of dense galaxies provide a direct measurement of stellar masses. Our dynamical masses (Mdyn), obtained from the spherical Jeans equations, are only weakly sensitive to the choice of anisotropy (β) due to the relatively large aperture of the SDSS fibre for these galaxies: Rap≃ 1.5Re. Assuming isotropic orbits (β= 0), we find a median log10(Mdyn/MSPS) = 0.233 ± 0.003, consistent with a Salpeter IMF, while more bottom-heavy IMFs and standard Milky Way IMFs are strongly disfavoured. Our results are consistent with, but do not require, a dependence of the IMF on dynamical mass or velocity dispersion. We find evidence for a colour dependence to the IMF such that redder galaxies have heavier IMFs with Mdyn/MSPS∝ (g−r)1.13 ± 0.09. This may reflect a more fundamental dependence of the IMF on the age or metallicity of a stellar population, or the density at which the stars formed.