  Let $M$ be a left module over a ring $R$ and $I$ an ideal of $R$. We call
$(P, f)$ a (locally)projective $I$-cover of $M$ if $f$ is an epimorphism from
$P$ to $M$, $P$ is (locally)projective, $Kerf\subseteq IP$, and whenever
$P=Kerf+X$, then there is a projective summand $Y$ of $P$ in $Kerf$ such that
$P=Y\oplus X$. This definition generalizes (locally)projective covers. We
characterize $I$-semiregular and $I$-semiperfect rings which are defined by
Yousif and Zhou [19] using (locally)projective $I$-covers in section 2 and 3.
$I$-semiregular and $I$-semiperfect rings are characterized by projectivity
classes in section 4. Finally, the notion of $I$-supplemented modules are
introduced and $I$-semiregular and $I$-semiperfect rings are characterized by
$I$-supplemented modules. Some well known results are obtained as corollaries.
