Primordial black holes can form in the early Universe from the collapse of cosmological perturbations after the cosmological horizon crossing. They are possible candidates for the dark matter as well as for the seeds of supermassive black holes observed today in the centre of galaxies. In calculations of spherically symmetric collapse, a Lagrangian relativistic hydrodynamical code is used to follow the non linear evolution. If the perturbation is larger than a threshold depending on the equation of state and on the specific shape of the perturbation, a black hole is formed. In this talk I will discuss the dependence of PBH formation from the initial shape of the curvature profile, showing the relation with the shape of the inflationary power spectrum. This allows to compute consistently the abundance of PBHs. Depending on the model, a proper calculation shows that the abundance of PBHs might be significantly increased by several order of magnitudes compared to previous estimations.