Datasets:

ArXiv:
License:
dp-bench / src /geometry.py
DaekyuKwon's picture
feat: Sync evaluation codes and leaderboard with the latest version (#5)
24702c6
from shapely.geometry import Polygon
from shapely import affinity
def is_included(points_0, points_1, soft=0.2):
polygon_0 = Polygon(points_0)
polygon_1 = Polygon(points_1)
polygon_1 = affinity.scale(polygon_1, xfact=1. - soft, yfact=1. - soft)
return polygon_0.contains(polygon_1)