improved caption detection