  The infrared excess from OB stars are commonly considered as contributions
from ionized stellar wind or circumstellar dust. With the newly published
LAMOST-OB catalog and GOSSS data, this work steps further on understanding the
infrared excess of OB stars. Based on a forward modeling approach comparing the
spectral slope of observational Spectral Energy Distributions (SED) and
photospheric models, 1147 stars are found to have infrared excess from 7818
stars with good-quality photometric data. After removing the objects in the
sightline of dark clouds, 532 ($\sim7\%$) B-type stars and 118 ($\sim23\%$)
O-type stars are identified to be true OB stars with circumstellar infrared
excess emission. The ionized stellar wind model and the circumstellar dust
model are adopted to explain the infrared excess, and Bayes Factors are
computed to quantitatively compare the two. It is shown that the infrared
excess can be accounted for by the stellar wind for about 65\% cases in which
33\% by free-free emission and 32\% by synchrotron radiation. Other 30\%
sources could have and 4\% should have a dust component or other mechanisms to
explain the sharply increase flux at $\lambda > 10\mu$m. The parameters of dust
model indicate a large-scale circumstellar halo structure which implies the
origin of the dust from the birthplace of the OB stars. A statistical study
suggests that the proportion with infrared excess in OB stars increases with
stellar effective temperature and luminosity, and that there is no systematic
change of the mechanism for infrared emission with stellar parameters.
