diff --git a/README.md b/README.md
index 37fd984..48f372a 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ This repo contains the main data model for the Starwit Awareness Engine (SAE). S
### Python / Poetry
- Add the following to your `pyproject.toml` dependencies section\
- `visionapi = { git = "https://github.com/starwit/vision-api.git", subdirectory = "python/visionapi", tag = "3.5.0" }`
+ `visionapi = { git = "https://github.com/starwit/vision-api.git", subdirectory = "python/visionapi", tag = "3.5.1" }`
### Java / Maven
- Add dependency to your project:
@@ -14,7 +14,7 @@ This repo contains the main data model for the Starwit Awareness Engine (SAE). S
de.starwit
vision-api
- 3.5.0
+ 3.5.1
```
- Add maven repository to your `~/.m2/settings.xml` (adapt example / your config as necessary):
@@ -82,6 +82,9 @@ This repo contains the main data model for the Starwit Awareness Engine (SAE). S
```
## Changelog
+### 3.5.1
+- Add `class_name` to `DetectionCount`
+
### 3.5.0
- Add `ModelMetadata` containing `class_names` mapping to `SaeMessage`
diff --git a/VERSION b/VERSION
index e5b8203..3c8ff8c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.5.0
\ No newline at end of file
+3.5.1
\ No newline at end of file
diff --git a/java/visionapi/pom.xml b/java/visionapi/pom.xml
index b17e113..2706c1d 100644
--- a/java/visionapi/pom.xml
+++ b/java/visionapi/pom.xml
@@ -6,7 +6,7 @@
vision-api
jar
- 3.5.0
+ 3.5.1
visionapi
https://github.com/starwit/vision-api
diff --git a/java/visionapi/src/main/java/de/starwit/visionapi/Analytics.java b/java/visionapi/src/main/java/de/starwit/visionapi/Analytics.java
index 7d583eb..4cff0e5 100644
--- a/java/visionapi/src/main/java/de/starwit/visionapi/Analytics.java
+++ b/java/visionapi/src/main/java/de/starwit/visionapi/Analytics.java
@@ -1045,6 +1045,12 @@ public interface DetectionCountOrBuilder extends
*/
int getClassId();
+ /**
+ * uint32 class_name = 10;
+ * @return The className.
+ */
+ int getClassName();
+
/**
* uint32 count = 2;
* @return The count.
@@ -1115,6 +1121,17 @@ public int getClassId() {
return classId_;
}
+ public static final int CLASS_NAME_FIELD_NUMBER = 10;
+ private int className_ = 0;
+ /**
+ * uint32 class_name = 10;
+ * @return The className.
+ */
+ @java.lang.Override
+ public int getClassName() {
+ return className_;
+ }
+
public static final int COUNT_FIELD_NUMBER = 2;
private int count_ = 0;
/**
@@ -1175,6 +1192,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getLocation());
}
+ if (className_ != 0) {
+ output.writeUInt32(10, className_);
+ }
getUnknownFields().writeTo(output);
}
@@ -1196,6 +1216,10 @@ public int getSerializedSize() {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getLocation());
}
+ if (className_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(10, className_);
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -1213,6 +1237,8 @@ public boolean equals(final java.lang.Object obj) {
if (getClassId()
!= other.getClassId()) return false;
+ if (getClassName()
+ != other.getClassName()) return false;
if (getCount()
!= other.getCount()) return false;
if (hasLocation() != other.hasLocation()) return false;
@@ -1233,6 +1259,8 @@ public int hashCode() {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CLASS_ID_FIELD_NUMBER;
hash = (53 * hash) + getClassId();
+ hash = (37 * hash) + CLASS_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getClassName();
hash = (37 * hash) + COUNT_FIELD_NUMBER;
hash = (53 * hash) + getCount();
if (hasLocation()) {
@@ -1377,6 +1405,7 @@ public Builder clear() {
super.clear();
bitField0_ = 0;
classId_ = 0;
+ className_ = 0;
count_ = 0;
location_ = null;
if (locationBuilder_ != null) {
@@ -1420,10 +1449,13 @@ private void buildPartial0(de.starwit.visionapi.Analytics.DetectionCount result)
result.classId_ = classId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.className_ = className_;
+ }
+ if (((from_bitField0_ & 0x00000004) != 0)) {
result.count_ = count_;
}
int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000004) != 0)) {
+ if (((from_bitField0_ & 0x00000008) != 0)) {
result.location_ = locationBuilder_ == null
? location_
: locationBuilder_.build();
@@ -1447,6 +1479,9 @@ public Builder mergeFrom(de.starwit.visionapi.Analytics.DetectionCount other) {
if (other.getClassId() != 0) {
setClassId(other.getClassId());
}
+ if (other.getClassName() != 0) {
+ setClassName(other.getClassName());
+ }
if (other.getCount() != 0) {
setCount(other.getCount());
}
@@ -1486,16 +1521,21 @@ public Builder mergeFrom(
} // case 8
case 16: {
count_ = input.readUInt32();
- bitField0_ |= 0x00000002;
+ bitField0_ |= 0x00000004;
break;
} // case 16
case 26: {
input.readMessage(
internalGetLocationFieldBuilder().getBuilder(),
extensionRegistry);
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000008;
break;
} // case 26
+ case 80: {
+ className_ = input.readUInt32();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 80
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
@@ -1545,6 +1585,38 @@ public Builder clearClassId() {
return this;
}
+ private int className_ ;
+ /**
+ * uint32 class_name = 10;
+ * @return The className.
+ */
+ @java.lang.Override
+ public int getClassName() {
+ return className_;
+ }
+ /**
+ * uint32 class_name = 10;
+ * @param value The className to set.
+ * @return This builder for chaining.
+ */
+ public Builder setClassName(int value) {
+
+ className_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ * uint32 class_name = 10;
+ * @return This builder for chaining.
+ */
+ public Builder clearClassName() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ className_ = 0;
+ onChanged();
+ return this;
+ }
+
private int count_ ;
/**
* uint32 count = 2;
@@ -1562,7 +1634,7 @@ public int getCount() {
public Builder setCount(int value) {
count_ = value;
- bitField0_ |= 0x00000002;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -1571,7 +1643,7 @@ public Builder setCount(int value) {
* @return This builder for chaining.
*/
public Builder clearCount() {
- bitField0_ = (bitField0_ & ~0x00000002);
+ bitField0_ = (bitField0_ & ~0x00000004);
count_ = 0;
onChanged();
return this;
@@ -1585,7 +1657,7 @@ public Builder clearCount() {
* @return Whether the location field is set.
*/
public boolean hasLocation() {
- return ((bitField0_ & 0x00000004) != 0);
+ return ((bitField0_ & 0x00000008) != 0);
}
/**
* .visionapi.GeoCoordinate location = 3;
@@ -1610,7 +1682,7 @@ public Builder setLocation(de.starwit.visionapi.Common.GeoCoordinate value) {
} else {
locationBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -1624,7 +1696,7 @@ public Builder setLocation(
} else {
locationBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -1633,7 +1705,7 @@ public Builder setLocation(
*/
public Builder mergeLocation(de.starwit.visionapi.Common.GeoCoordinate value) {
if (locationBuilder_ == null) {
- if (((bitField0_ & 0x00000004) != 0) &&
+ if (((bitField0_ & 0x00000008) != 0) &&
location_ != null &&
location_ != de.starwit.visionapi.Common.GeoCoordinate.getDefaultInstance()) {
getLocationBuilder().mergeFrom(value);
@@ -1644,7 +1716,7 @@ public Builder mergeLocation(de.starwit.visionapi.Common.GeoCoordinate value) {
locationBuilder_.mergeFrom(value);
}
if (location_ != null) {
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000008;
onChanged();
}
return this;
@@ -1653,7 +1725,7 @@ public Builder mergeLocation(de.starwit.visionapi.Common.GeoCoordinate value) {
* .visionapi.GeoCoordinate location = 3;
*/
public Builder clearLocation() {
- bitField0_ = (bitField0_ & ~0x00000004);
+ bitField0_ = (bitField0_ & ~0x00000008);
location_ = null;
if (locationBuilder_ != null) {
locationBuilder_.dispose();
@@ -1666,7 +1738,7 @@ public Builder clearLocation() {
* .visionapi.GeoCoordinate location = 3;
*/
public de.starwit.visionapi.Common.GeoCoordinate.Builder getLocationBuilder() {
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000008;
onChanged();
return internalGetLocationFieldBuilder().getBuilder();
}
@@ -1773,10 +1845,11 @@ public de.starwit.visionapi.Analytics.DetectionCount getDefaultInstanceForType()
"tMessage\022\030\n\020timestamp_utc_ms\030\001 \001(\004\0223\n\020de" +
"tection_counts\030\002 \003(\0132\031.visionapi.Detecti" +
"onCount\022\020\n\010sae_uuid\030\004 \001(\014\022%\n\004type\030\350\007 \001(\016" +
- "2\026.visionapi.MessageType\"]\n\016DetectionCou" +
- "nt\022\020\n\010class_id\030\001 \001(\r\022\r\n\005count\030\002 \001(\r\022*\n\010l" +
- "ocation\030\003 \001(\0132\030.visionapi.GeoCoordinateB" +
- "\026\n\024de.starwit.visionapib\006proto3"
+ "2\026.visionapi.MessageType\"q\n\016DetectionCou" +
+ "nt\022\020\n\010class_id\030\001 \001(\r\022\022\n\nclass_name\030\n \001(\r" +
+ "\022\r\n\005count\030\002 \001(\r\022*\n\010location\030\003 \001(\0132\030.visi" +
+ "onapi.GeoCoordinateB\026\n\024de.starwit.vision" +
+ "apib\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
@@ -1794,7 +1867,7 @@ public de.starwit.visionapi.Analytics.DetectionCount getDefaultInstanceForType()
internal_static_visionapi_DetectionCount_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_visionapi_DetectionCount_descriptor,
- new java.lang.String[] { "ClassId", "Count", "Location", });
+ new java.lang.String[] { "ClassId", "ClassName", "Count", "Location", });
descriptor.resolveAllFeaturesImmutable();
de.starwit.visionapi.Common.getDescriptor();
}
diff --git a/python/visionapi/pyproject.toml b/python/visionapi/pyproject.toml
index d8e8123..3577f02 100644
--- a/python/visionapi/pyproject.toml
+++ b/python/visionapi/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "visionapi"
-version = "3.5.0"
+version = "3.5.1"
description = ""
authors = ["flonix8 "]
readme = "README.md"
diff --git a/python/visionapi/visionapi/analytics_pb2.py b/python/visionapi/visionapi/analytics_pb2.py
index abeddf8..be7d1bc 100644
--- a/python/visionapi/visionapi/analytics_pb2.py
+++ b/python/visionapi/visionapi/analytics_pb2.py
@@ -25,7 +25,7 @@
from visionapi import common_pb2 as visionapi_dot_common__pb2
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19visionapi/analytics.proto\x12\tvisionapi\x1a\x16visionapi/common.proto\"\x9f\x01\n\x15\x44\x65tectionCountMessage\x12\x18\n\x10timestamp_utc_ms\x18\x01 \x01(\x04\x12\x33\n\x10\x64\x65tection_counts\x18\x02 \x03(\x0b\x32\x19.visionapi.DetectionCount\x12\x10\n\x08sae_uuid\x18\x04 \x01(\x0c\x12%\n\x04type\x18\xe8\x07 \x01(\x0e\x32\x16.visionapi.MessageType\"]\n\x0e\x44\x65tectionCount\x12\x10\n\x08\x63lass_id\x18\x01 \x01(\r\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12*\n\x08location\x18\x03 \x01(\x0b\x32\x18.visionapi.GeoCoordinateB\x16\n\x14\x64\x65.starwit.visionapib\x06proto3')
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19visionapi/analytics.proto\x12\tvisionapi\x1a\x16visionapi/common.proto\"\x9f\x01\n\x15\x44\x65tectionCountMessage\x12\x18\n\x10timestamp_utc_ms\x18\x01 \x01(\x04\x12\x33\n\x10\x64\x65tection_counts\x18\x02 \x03(\x0b\x32\x19.visionapi.DetectionCount\x12\x10\n\x08sae_uuid\x18\x04 \x01(\x0c\x12%\n\x04type\x18\xe8\x07 \x01(\x0e\x32\x16.visionapi.MessageType\"q\n\x0e\x44\x65tectionCount\x12\x10\n\x08\x63lass_id\x18\x01 \x01(\r\x12\x12\n\nclass_name\x18\n \x01(\r\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12*\n\x08location\x18\x03 \x01(\x0b\x32\x18.visionapi.GeoCoordinateB\x16\n\x14\x64\x65.starwit.visionapib\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -36,5 +36,5 @@
_globals['_DETECTIONCOUNTMESSAGE']._serialized_start=65
_globals['_DETECTIONCOUNTMESSAGE']._serialized_end=224
_globals['_DETECTIONCOUNT']._serialized_start=226
- _globals['_DETECTIONCOUNT']._serialized_end=319
+ _globals['_DETECTIONCOUNT']._serialized_end=339
# @@protoc_insertion_point(module_scope)
diff --git a/python/visionapi/visionapi/analytics_pb2.pyi b/python/visionapi/visionapi/analytics_pb2.pyi
index 342e57f..ad6865b 100644
--- a/python/visionapi/visionapi/analytics_pb2.pyi
+++ b/python/visionapi/visionapi/analytics_pb2.pyi
@@ -20,11 +20,13 @@ class DetectionCountMessage(_message.Message):
def __init__(self, timestamp_utc_ms: _Optional[int] = ..., detection_counts: _Optional[_Iterable[_Union[DetectionCount, _Mapping]]] = ..., sae_uuid: _Optional[bytes] = ..., type: _Optional[_Union[_common_pb2.MessageType, str]] = ...) -> None: ...
class DetectionCount(_message.Message):
- __slots__ = ("class_id", "count", "location")
+ __slots__ = ("class_id", "class_name", "count", "location")
CLASS_ID_FIELD_NUMBER: _ClassVar[int]
+ CLASS_NAME_FIELD_NUMBER: _ClassVar[int]
COUNT_FIELD_NUMBER: _ClassVar[int]
LOCATION_FIELD_NUMBER: _ClassVar[int]
class_id: int
+ class_name: int
count: int
location: _common_pb2.GeoCoordinate
- def __init__(self, class_id: _Optional[int] = ..., count: _Optional[int] = ..., location: _Optional[_Union[_common_pb2.GeoCoordinate, _Mapping]] = ...) -> None: ...
+ def __init__(self, class_id: _Optional[int] = ..., class_name: _Optional[int] = ..., count: _Optional[int] = ..., location: _Optional[_Union[_common_pb2.GeoCoordinate, _Mapping]] = ...) -> None: ...
diff --git a/visionapi/analytics.proto b/visionapi/analytics.proto
index bcefc8b..6bc20d7 100644
--- a/visionapi/analytics.proto
+++ b/visionapi/analytics.proto
@@ -15,6 +15,7 @@ message DetectionCountMessage {
message DetectionCount {
uint32 class_id = 1;
+ uint32 class_name = 10;
uint32 count = 2;
GeoCoordinate location = 3;
}
\ No newline at end of file