We use machine learning algorithms (artificial neural networks, ANNs) to estimate petrophysical models at seismic scale combining well-log information, seismic data and seismic attributes. The resulting petrophysical images are the prior inputs in the process of full-waveform inversion (FWI). We calculate seismic attributes from a stacked reflected 2-D seismic section and then train ANNs to approximate the following petrophysical parameters: P-wave velocity ($$V_\mathrm{{p}}$$
V
p
), density ($$\rho $$
ρ
) and volume of clay ($$V_\mathrm{{clay}}$$
V
clay
). We extend the use of the $$V_\mathrm{{clay}}$$
V
clay
by constraining it with the well lithology and we establish two classes: sands and shales. Consequently, machine learning allows us to build an initial estimate of the earth property model ($$V_\mathrm{{p}}$$
V
p
), which is iteratively refined to produce a synthetic seismogram that matches the observed seismic data. We apply the 1-D Kennett method as a forward modeling tool to create synthetic data with the images of $$V_\mathrm{{p}}$$
V
p
, $$\rho $$
ρ
and the thickness of layers (sands or shales) obtained with the ANNs. A nonlinear least-squares inversion algorithm minimizes the residual (or misfit) between observed and synthetic full-waveform data, which improves the $$V_\mathrm{{p}}$$
V
p
resolution. In order to show the advantage of using the ANN velocity model as the initial velocity model for the inversion, we compare the results obtained with the ANNs and two other initial velocity models. One of these alternative initial velocity models is computed via P-wave impedance, and the other is achieved by velocity semblance analysis: root-mean-square velocity (RMS). The results are in good agreement when we use $$\rho $$
ρ
and $$V_\mathrm{{p}}$$
V
p
obtained by ANNs. However, the results are poor and the synthetic data do not match the real acquired data when using the semblance velocity model and the $$\rho $$
ρ
from the well log (constant for the entire 2-D section). Nevertheless, the results improve when including $$\rho $$
ρ
, the layered structure driven by the $$V_\mathrm{{clay}}$$
V
clay
(both obtained with ANNs) and the semblance velocity model. When doing inversion starting with the initial $$V_\mathrm{{p}}$$
V
p
model estimated using the P-wave impedance, there is some gain of the final $$V_\mathrm{{p}}$$
V
p
with respect to the RMS initial $$V_\mathrm{{p}}$$
V
p
. To assess the quality of the inversion of $$V_\mathrm{{p}}$$
V
p
, we use the information for two available wells and compare the final $$V_\mathrm{{p}}$$
V
p
obtained with ANNs and the final $$V_\mathrm{{p}}$$
V
p
computed with the P-wave impedance. This shows the benefit of employing ANNs estimations as prior models during the inversion process to obtain a final $$V_\mathrm{{p}}$$
V
p
that is in agreement with the geology and with the seismic and well-log data. To illustrate the computation of the final velocity model via FWI, we provide an algorithm with the detailed steps and its corresponding GitHub code.