Added automatic bounding box detection