They are non-military and non-commercial. They typically fly for “recreational” purposes as long as the pilots/programmers keep them within tight limits on altitude and distance. Usually the UAV is operated manually by the Radio Control (RC) mechanism at take-off and landing and is switched into GPS-guided autonomous mode only at a safe altitude.
The DIY Drones community has created the world’s first “universal autopilots”, ArduPilot Mega (APM) and its similar but technically advanced Pixhawk. They combine sophisticated IMU-based autopilot electronics with free autopilot software that can help any RC vehicle in transitioning from an RC vehicle to a fully-autonomous UAV.