This is the purpose of the "Decloaker" ship, in general. It's a matter of if you want to spend the knowledge to get rid of the last remnants of the AI, or if you want to live with the AI ships still being there a bit. The big red count of hostile AI ships is not including these sorts of remnants (mines, etc), so players know there is just some "AI detritus" hanging around, in general.