Process for the production of lipids from biomass comprising polysaccharides. The biomass is subjected to acid hydrolysis to obtain a solid phase and an aqueous phase. The solid phase is subjected to acid or to enzymatic hydrolysis obtaining a further solid phase and a further aqueous phase. The aqueous phases obtained from both hydrolysis steps are subjected to fermentation with an oleaginous yeast. The obtained fermentation broth comprises oleaginous cellular biomass which is subjected to microfiltration for the isolation of lipids. Said lipids can be used in the production of biodiesel or green diesel.