Skip to content

Commit 4415f03

Browse files
committed
2 parents 0d39b59 + 41c91e8 commit 4415f03

File tree

21 files changed

+264
-2050
lines changed

21 files changed

+264
-2050
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
1717
RUN update-alternatives --install /usr/local/bin/pip pip /usr/bin/pip3 1
1818

1919
RUN apt-get install -y build-essential && \
20+
pip install --no-cache-dir shapely && \
2021
pip install --no-cache-dir ${PIP_FLAGS} superannotate && \
2122
apt-get remove -y build-essential && \
2223
apt-get -y autoremove && \

MANIFEST.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
include README.md
22
include requirements.txt
3-
include requirements_coco.txt
43
include LICENSE
5-
include superannotate/pycocotools_sa/maskApi.h

pyproject.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

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

setup.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import numpy as np
2-
from setuptools import Extension, find_packages, setup
1+
from setuptools import find_packages, setup
32

43
with open('requirements.txt') as f:
54
requirements = f.read()
@@ -18,18 +17,6 @@
1817
Version = Version.rstrip()
1918
Version = Version[15:-1]
2019

21-
ext_modules = [
22-
Extension(
23-
'superannotate.pycocotools_sa._mask',
24-
sources=[
25-
'superannotate/pycocotools_sa/_mask.pyx',
26-
'superannotate/pycocotools_sa/maskApi.c'
27-
],
28-
include_dirs=[np.get_include(), 'superannotate/pycocotools_sa'],
29-
extra_compile_args=[],
30-
)
31-
]
32-
3320
setup(
3421
name='superannotate',
3522
version=Version,
@@ -46,6 +33,5 @@
4633
entry_points={
4734
'console_scripts': ['superannotatecli = superannotate.__main__:main']
4835
},
49-
python_requires='>=3.6',
50-
ext_modules=ext_modules
36+
python_requires='>=3.6'
5137
)

superannotate/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@
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+
21+
try:
22+
from .consensus_benchmark.benchmark import benchmark
23+
from .consensus_benchmark.consensus import consensus
24+
except:
25+
pass
26+
2227
from .dataframe_filtering import (
2328
filter_annotation_instances, filter_images_by_comments,
2429
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()

superannotate/input_converters/converters/coco_converters/coco_to_sa_pixel.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
logger = logging.getLogger("superannotate-python-sdk")
1414

15+
1516
def annot_to_bitmask(annot):
1617
if isinstance(annot['counts'], list):
1718
bitmask = _maskfrRLE(annot)
@@ -20,6 +21,7 @@ def annot_to_bitmask(annot):
2021

2122
return bitmask
2223

24+
2325
def coco_panoptic_segmentation_to_sa_pixel(coco_path, images_path):
2426
coco_json = json.load(open(coco_path))
2527
hex_colors = blue_color_generator(len(coco_json["categories"]))

0 commit comments

Comments
 (0)