Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2709cc4
Deleted deprecated functions
VaghinakDev Nov 24, 2022
d6add78
test changes
VaghinakDev Nov 24, 2022
05ab141
version update
VaghinakDev Nov 24, 2022
aa5e4b7
updated search folders
VaghinakDev Nov 25, 2022
b923c04
Tests update
VaghinakDev Nov 25, 2022
ee56c12
Added folder search tests
VaghinakDev Nov 28, 2022
553ce56
version update
VaghinakDev Nov 28, 2022
62feeea
Merge branch 'develop' into friday
VaghinakDev Nov 28, 2022
fb88bda
Merge pull request #533 from superannotateai/friday
VaghinakDev Nov 28, 2022
897865f
docstring update
VaghinakDev Nov 28, 2022
7f7826a
fixing __objects.json and freestyle attributes
VahagnTKA Nov 28, 2022
305f87d
Merge pull request #534 from superannotateai/1510_objects_json
VaghinakDev Nov 29, 2022
ac3e13a
Test fix
VaghinakDev Nov 29, 2022
fe31dc3
Fix integrations search
VaghinakDev Nov 30, 2022
853e09e
replacing forbidden chars
VahagnTKA Nov 30, 2022
5ec6c22
Merge pull request #535 from superannotateai/1534_download_export
VaghinakDev Nov 30, 2022
3171916
Added subsets tests
VaghinakDev Nov 30, 2022
e12c8cd
repace is not inplace
VahagnTKA Dec 1, 2022
3d8c94e
Update __init__.py
VaghinakDev Dec 1, 2022
f9f02dd
fixing .zip extension
VahagnTKA Dec 1, 2022
85c8976
Merge branch 'friday' of github.com:superannotateai/superannotate-pyt…
VahagnTKA Dec 1, 2022
071af7a
Update __init__.py
VaghinakDev Dec 1, 2022
28b8680
Merge pull request #536 from superannotateai/friday
VaghinakDev Dec 1, 2022
3cfad5e
Update __init__.py
VaghinakDev Dec 1, 2022
92f8e9a
Update filename change logic
VaghinakDev Dec 1, 2022
2d0f794
Fix list_by_names
VaghinakDev Dec 2, 2022
72d3c23
Changed validation in SetAnnotationStatues
VaghinakDev Dec 2, 2022
233a0b6
Update __init__.py
VaghinakDev Dec 2, 2022
2cb2a29
Update CHANGELOG.md
VaghinakDev Dec 4, 2022
4ff7e62
Merge branch 'master' into develop
VaghinakDev Dec 4, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Changelog
All release highlights of this project will be documented in this file.

## 4.4.7 - December 04, 2022
### Updated
- `SAClient.search_folders` _method_ to add a new `status` argument for searching folders via status.
- Schemas for `Annotation Classes` and `Video Annotation` to support **text** and **numeric input** attribute group types.
### Fixed
- `SAClient.query` _method_ to address invalid exceptions.
- `SAClient.download_export` _method_ to address the issue with downloading for Windows OS.
- `SAClient.attach_items_from_integrated_storage` _method_ to address "integration not found" error.
- `SAClient.aggregate_annotations_as_df` _method_ to support files without "___objects" in their naming.
### Removed
- `SAClient.add_annotation_bbox_to_image` _method_, use `SAClient.upload_annotations` instead.
- `SAClient.add_annotation_point_to_image` _method_, use `SAClient.upload_annotations` instead.
- `SAClient.add_annotation_comment_to_image` _method_, use `SAClient.upload_annotations` instead.
###
## 4.4.6 - November 23, 2022
### Updated
- `SAClient.aggregate_annotations_as_df` method to aggregate "comment" type instances.
Expand Down
5 changes: 2 additions & 3 deletions docs/source/superannotate.sdk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ ________
.. automethod:: superannotate.SAClient.get_project_metadata
.. automethod:: superannotate.SAClient.get_project_image_count
.. automethod:: superannotate.SAClient.search_folders
.. automethod:: superannotate.SAClient.assign_folder
.. automethod:: superannotate.SAClient.unassign_folder
.. automethod:: superannotate.SAClient.get_folder_metadata
.. automethod:: superannotate.SAClient.create_folder
.. automethod:: superannotate.SAClient.delete_folders
Expand Down Expand Up @@ -107,9 +109,6 @@ ______
.. automethod:: superannotate.SAClient.download_image_annotations
.. automethod:: superannotate.SAClient.upload_image_annotations
.. automethod:: superannotate.SAClient.pin_image
.. automethod:: superannotate.SAClient.add_annotation_bbox_to_image
.. automethod:: superannotate.SAClient.add_annotation_point_to_image
.. automethod:: superannotate.SAClient.add_annotation_comment_to_image
.. automethod:: superannotate.SAClient.upload_priority_scores

----------
Expand Down
2 changes: 1 addition & 1 deletion src/superannotate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sys


__version__ = "4.4.6"
__version__ = "4.4.7"


sys.path.append(os.path.split(os.path.realpath(__file__))[0])
Expand Down
30 changes: 15 additions & 15 deletions src/superannotate/lib/app/analytics/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import pandas as pd
import plotly.express as px
from lib.app.exceptions import AppException
from lib.core import DEPRICATED_DOCUMENT_VIDEO_MESSAGE
from superannotate.logger import get_default_logger


Expand Down Expand Up @@ -44,14 +43,6 @@ def aggregate_image_annotations_as_df(
:rtype: pandas DataFrame
"""

json_paths = list(Path(str(project_root)).glob("*.json"))
if (
json_paths
and "___pixel.json" not in json_paths[0].name
and "___objects.json" not in json_paths[0].name
):
raise AppException(DEPRICATED_DOCUMENT_VIDEO_MESSAGE)

logger.info("Aggregating annotations from %s as pandas DataFrame", project_root)

annotation_data = {
Expand Down Expand Up @@ -101,12 +92,16 @@ def aggregate_image_annotations_as_df(
classes_json = json.load(open(classes_path))
class_name_to_color = {}
class_group_name_to_values = {}
freestyle_attributes = set()
for annotation_class in classes_json:
name = annotation_class["name"]
color = annotation_class["color"]
class_name_to_color[name] = color
class_group_name_to_values[name] = {}
for attribute_group in annotation_class["attribute_groups"]:
group_type = attribute_group.get("group_type")
if group_type and group_type in ["text", "numeric"]:
freestyle_attributes.add(attribute_group["name"])
class_group_name_to_values[name][attribute_group["name"]] = []
for attribute in attribute_group["attributes"]:
class_group_name_to_values[name][attribute_group["name"]].append(
Expand Down Expand Up @@ -175,10 +170,14 @@ def __get_user_metadata(annotation):

if not annotations_paths:
logger.warning(f"Could not find annotations in {project_root}.")
if len(list(Path(project_root).rglob("*___objects.json"))) > 0:

if "___objects.json" in annotations_paths[0].name:
type_postfix = "___objects.json"
else:
elif "___pixel.json" in annotations_paths[0].name:
type_postfix = "___pixel.json"
else:
type_postfix = ".json"

for annotation_path in annotations_paths:
annotation_json = json.load(open(annotation_path))
parts = annotation_path.name.split(type_postfix)
Expand Down Expand Up @@ -294,6 +293,7 @@ def __get_user_metadata(annotation):
not in class_group_name_to_values[annotation_class_name][
attribute_group
]
and attribute_group not in freestyle_attributes
):
logger.warning(
"Annotation class group value %s not in classes json. Skipping.",
Expand Down Expand Up @@ -383,9 +383,9 @@ def instance_consensus(inst_1, inst_2):

:param inst_1: First instance for consensus score.
:type inst_1: shapely object

:param inst_2: Second instance for consensus score.
:type inst_2: shapely object

"""
if inst_1.type == inst_2.type == "Polygon":
intersect = inst_1.intersection(inst_2)
Expand All @@ -404,19 +404,19 @@ def image_consensus(df, image_name, annot_type):

:param df: Annotation data of all images
:type df: pandas.DataFrame

:param image_name: The image name for which the consensus score will be computed
:type image_name: str

:param annot_type: Type of annotation instances to consider. Available candidates are: ["bbox", "polygon", "point"]
:type dataset_format: str

"""

try:
from shapely.geometry import Point, Polygon, box
except ImportError:
raise ImportError(
"To use superannotate.benchmark or superannotate.consensus functions please install "
"shapely package in Anaconda enviornment with # conda install shapely"
"To use superannotate.benchmark or superannotate.consensus functions please install shapely package."
)

image_df = df[df["imageName"] == image_name]
Expand Down
198 changes: 0 additions & 198 deletions src/superannotate/lib/app/annotation_helpers.py

This file was deleted.

Loading