This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch rel/0.67.0
in repository
https://gitbox.apache.org/repos/asf/incubator-streampipes-extensions.git
The following commit(s) were added to refs/heads/rel/0.67.0 by this push:
new 43acc2b [hotfix] Use append output strategy for generic image
classifier
new 815ab0a Merge branch 'rel/0.67.0' of
github.com:apache/incubator-streampipes-extensions into rel/0.67.0
43acc2b is described below
commit 43acc2b9977e61da8a9f1fb99281fac4bed55aea
Author: Dominik Riemer <[email protected]>
AuthorDate: Fri Sep 18 09:32:17 2020 +0200
[hotfix] Use append output strategy for generic image classifier
---
.../genericclassification/GenericImageClassification.java | 7 +++----
.../GenericImageClassificationController.java | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git
a/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/genericclassification/GenericImageClassification.java
b/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/genericclassification/GenericImageClassification.java
index ba52613..7e2d0aa 100644
---
a/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/genericclassification/GenericImageClassification.java
+++
b/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/genericclassification/GenericImageClassification.java
@@ -88,10 +88,9 @@ public class GenericImageClassification implements
EventProcessor<GenericImageCl
if (scores.size() > 0) {
System.out.println(scores.get(0).score +":"
+categories.get(scores.get(0).category));
//scores.forEach(score -> System.out.println(score.category +":"
+categories.get(score.category) +":" +score));
- Event outEvent = new Event();
- outEvent.addField("score", scores.get(0).score);
- outEvent.addField("category", categories.get(scores.get(0).category));
- out.collect(outEvent);
+ in.addField("score", scores.get(0).score);
+ in.addField("category", categories.get(scores.get(0).category));
+ out.collect(in);
}
}
}
diff --git
a/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/genericclassification/GenericImageClassificationController.java
b/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/genericclassification/GenericImageClassificationController.java
index b54eb28..a57f70f 100644
---
a/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/genericclassification/GenericImageClassificationController.java
+++
b/streampipes-processors-image-processing-jvm/src/main/java/org/apache/streampipes/processors/imageprocessing/jvm/processor/genericclassification/GenericImageClassificationController.java
@@ -45,7 +45,7 @@ public class GenericImageClassificationController extends
StandaloneEventProcess
.domainPropertyReq("https://image.com"),
Labels.withId(IMAGE),
PropertyScope.NONE)
.build())
- .outputStrategy(OutputStrategies.fixed(
+ .outputStrategy(OutputStrategies.append(
EpProperties.doubleEp(Labels.empty(), "score",
"https://schema.org/score"),
EpProperties.stringEp(Labels.empty(), "category",
"https://schema.org/category")