Context. While Gaia enables us to probe the extended local neighbourhood in great detail, the thin disc structure at larger distances remains sparsely explored. Aims. We aim here to build a non-parametric 3D model of the thin disc structures handling both the extinction and the stellar density simultaneously. Methods. We developed a Bayesian deconvolution method in two dimensions: extinction and distance. It uses a reference catalogue whose completeness information defines the selection function. It is designed so that any complementary information from other catalogues can be added. It has also been designed to be robust to outliers, which are frequent in crowded fields, and differential extinction. The prior information is designed to be ...