  We use Gaia DR2 magnitudes, colours and parallaxes for stars with G<12 to
explore a 15-dimensional space that includes simultaneously the initial mass
function (IMF) and a non-parametric star formation history (SFH) for the
Galactic disc. This inference is performed by combining the Besancon Galaxy
Model fast approximate simulations (BGM FASt) and an approximate Bayesian
computation algorithm. We find in Gaia DR2 data an imprint of a star formation
burst 2-3 Gyr ago, in the Galactic thin disc domain, and a present star
formation rate (SFR) of about 1 Msun. Our results show a decreasing trend of
the SFR from 9-10 Gyr to 6-7 Gyr ago. This is consistent with the cosmological
star formation quenching observed at redshifts z<1.8. This decreasing trend is
followed by a SFR enhancement starting at about 5 Gyr ago and continuing until
about 1 Gyr ago which is detected with high statistical significance by
discarding the null hypothesis of an exponential SFH with a p-value=0.002. We
estimate, from our best fit model, that about the 50% of the mass used to
generate stars, along the thin disc life, was expended in the period from 5 to
1 Gyr ago. The timescale and the amount of stellar mass generated during the
SFR enhancement event lead us to hypothesise that its origin, currently under
investigation, is not intrinsic to the disc. Thus, an external perturbation is
needed for its explanation. Additionally we find, for the thin disc, a slope of
the IMF of $\alpha_3 \approx 2$ for masses M>1.53 Msun and $\alpha_2 \approx
1.3$ for the mass range between 0,5 and 1,53 Msun. This is the first time that
we consider a non-parametric SFH for the thin disc in the Besancon Galaxy
Model. This new step, together with the capabilities of the Gaia DR2 parallaxes
to break degeneracies between different stellar populations, allow us to better
constrain the SFH and the IMF.
