Skip to content

Commit 6da2f52

Browse files
committed
Remove shapely dependency
1 parent 02a4740 commit 6da2f52

File tree

5 files changed

+13
-18
lines changed

5 files changed

+13
-18
lines changed

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ packaging>=20.4
1414
pandas>=1.1.2
1515
plotly>=4.1.0
1616
ffmpeg-python>=0.2.0
17-
Shapely>=1.7.1
1817
google-cloud-storage>=1.33.0
1918
azure-storage-blob>=12.6.0

superannotate/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
)
1818
from .api import API as _API
1919
from .common import image_path_to_annotation_paths
20-
from .consensus_benchmark.benchmark import benchmark
21-
from .consensus_benchmark.consensus import consensus
20+
# from .consensus_benchmark.benchmark import benchmark
21+
# from .consensus_benchmark.consensus import consensus
2222
from .dataframe_filtering import (
2323
filter_annotation_instances, filter_images_by_comments,
2424
filter_images_by_tags

superannotate/consensus_benchmark/helpers.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
from shapely.geometry import Polygon, box, Point
2-
import plotly.express as px
3-
from plotly.subplots import make_subplots
4-
import plotly.graph_objects as go
5-
import plotly.colors as col
61
import logging
7-
import numpy as np
2+
3+
import plotly.express as px
4+
from shapely.geometry import Point, Polygon, box
5+
86
logger = logging.getLogger("superannotate-python-sdk")
97

108

@@ -185,4 +183,4 @@ def consensus_plot(consensus_df, projects):
185183
)
186184
fig.for_each_annotation(lambda a: a.update(text=a.text.split("=")[-1]))
187185
fig.for_each_trace(lambda t: t.update(name=t.name.split("=")[-1]))
188-
fig.show()
186+
fig.show()

tests/consensus_benchmark/test_benchmark.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from pathlib import Path
2-
import superannotate as sa
32

4-
sa.init(Path.home() / ".superannotate" / "config.json")
3+
from superannotate.consensus_benchmark.benchmark import benchmark
54

65
test_root = Path().resolve() / 'tests'
76

@@ -16,7 +15,7 @@ def test_benchmark():
1615
]
1716
export_path = test_root / 'consensus_benchmark'
1817
for annot_type in annot_types:
19-
res_df = sa.benchmark(
18+
res_df = benchmark(
2019
gt_project_name,
2120
project_names,
2221
export_root=export_path,
@@ -40,7 +39,7 @@ def test_benchmark():
4039
]
4140

4241
#test filtering images with given image names list
43-
res_images = sa.benchmark(
42+
res_images = benchmark(
4443
gt_project_name,
4544
project_names,
4645
export_root=export_path,

tests/consensus_benchmark/test_consensus.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from pathlib import Path
2-
import superannotate as sa
32

4-
sa.init(Path.home() / ".superannotate" / "config.json")
3+
from superannotate.consensus_benchmark.consensus import consensus
54

65
test_root = Path().resolve() / 'tests'
76

@@ -15,7 +14,7 @@ def test_consensus():
1514
]
1615
export_path = test_root / 'consensus_benchmark'
1716
for annot_type in annot_types:
18-
res_df = sa.consensus(
17+
res_df = consensus(
1918
project_names, export_root=export_path, annot_type=annot_type
2019
)
2120
#test content of projectName column
@@ -36,7 +35,7 @@ def test_consensus():
3635
]
3736

3837
#test filtering images with given image names list
39-
res_images = sa.consensus(
38+
res_images = consensus(
4039
project_names, export_root=export_path, image_list=image_names
4140
)
4241

0 commit comments

Comments
 (0)