Bastien Dechamps
[ADD] Random Guessr
dfbe385
raw
history blame contribute delete
493 Bytes
import numpy as np
from PIL import Image
from .abstract_guessr import AbstractGuessr
from ..interfaces import Coordinate
class RandomGuessr(AbstractGuessr):
"""Guesses a random coordinate
"""
@staticmethod
def _random_coordinate() -> Coordinate:
return Coordinate(
latitude=np.random.uniform(-90, 90),
longitude=np.random.uniform(-180, 180)
)
def guess(self, image: Image) -> Coordinate:
return self._random_coordinate()