-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proper image support in new pipeline/data API + Context/Metrics/Profi…
…ler API (placeholder) (#308) * API change: add Context to execution API with profiler() and metrics() methods + placeholder APIs Signed-off-by: Alex Black <blacka101@gmail.com> * Image JSON, PNG file support, class relocations, fixes Signed-off-by: Alex Black <blacka101@gmail.com> * BufferedImage support Signed-off-by: Alex Black <blacka101@gmail.com> * Add konduit-serving-javacv Signed-off-by: Alex Black <blacka101@gmail.com> * Add 2-step image conversion: X -> PNG -> Y when no direct X -> Y converter exists Signed-off-by: Alex Black <blacka101@gmail.com> * 2-step X -> SerializedNDArray -> Y conversion for NDArrays; fix image type conversion in konduit-serving-camera Signed-off-by: Alex Black <blacka101@gmail.com> * Update readme Signed-off-by: Alex Black <blacka101@gmail.com>
- Loading branch information
1 parent
67673c7
commit 65c2372
Showing
83 changed files
with
2,271 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ /* ****************************************************************************** | ||
~ * Copyright (c) 2020 Konduit K.K. | ||
~ * | ||
~ * This program and the accompanying materials are made available under the | ||
~ * terms of the Apache License, Version 2.0 which is available at | ||
~ * https://www.apache.org/licenses/LICENSE-2.0. | ||
~ * | ||
~ * Unless required by applicable law or agreed to in writing, software | ||
~ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
~ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
~ * License for the specific language governing permissions and limitations | ||
~ * under the License. | ||
~ * | ||
~ * SPDX-License-Identifier: Apache-2.0 | ||
~ ******************************************************************************/ | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>konduit-serving-data</artifactId> | ||
<groupId>ai.konduit.serving</groupId> | ||
<version>0.1.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>konduit-serving-javacv</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>ai.konduit.serving</groupId> | ||
<artifactId>konduit-serving-pipeline</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.bytedeco</groupId> | ||
<artifactId>javacv-platform</artifactId> | ||
<version>${javacpp.version}</version> | ||
</dependency> | ||
|
||
|
||
<!-- Test dependencies --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
|
||
<dependency> | ||
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<version>${logback.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
</project> |
28 changes: 28 additions & 0 deletions
28
.../konduit-serving-javacv/src/main/java/ai/konduit/serving/data/javacv/data/FrameImage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* ****************************************************************************** | ||
* * Copyright (c) 2020 Konduit K.K. | ||
* * | ||
* * This program and the accompanying materials are made available under the | ||
* * terms of the Apache License, Version 2.0 which is available at | ||
* * https://www.apache.org/licenses/LICENSE-2.0. | ||
* * | ||
* * Unless required by applicable law or agreed to in writing, software | ||
* * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* * License for the specific language governing permissions and limitations | ||
* * under the License. | ||
* * | ||
* * SPDX-License-Identifier: Apache-2.0 | ||
* ***************************************************************************** | ||
*/ | ||
|
||
package ai.konduit.serving.data.javacv.data; | ||
|
||
import ai.konduit.serving.pipeline.impl.data.image.BaseImage; | ||
import org.bytedeco.javacv.Frame; | ||
|
||
public class FrameImage extends BaseImage<Frame> { | ||
public FrameImage(Frame image) { | ||
super(image); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...ta/konduit-serving-javacv/src/main/java/ai/konduit/serving/data/javacv/data/MatImage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* ****************************************************************************** | ||
* * Copyright (c) 2020 Konduit K.K. | ||
* * | ||
* * This program and the accompanying materials are made available under the | ||
* * terms of the Apache License, Version 2.0 which is available at | ||
* * https://www.apache.org/licenses/LICENSE-2.0. | ||
* * | ||
* * Unless required by applicable law or agreed to in writing, software | ||
* * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* * License for the specific language governing permissions and limitations | ||
* * under the License. | ||
* * | ||
* * SPDX-License-Identifier: Apache-2.0 | ||
* ***************************************************************************** | ||
*/ | ||
|
||
package ai.konduit.serving.data.javacv.data; | ||
|
||
import ai.konduit.serving.pipeline.impl.data.image.BaseImage; | ||
import org.bytedeco.opencv.opencv_core.Mat; | ||
|
||
public class MatImage extends BaseImage<Mat> { | ||
public MatImage(Mat image) { | ||
super(image); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...duit-serving-javacv/src/main/java/ai/konduit/serving/data/javacv/data/OpenCVMatImage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* ****************************************************************************** | ||
* * Copyright (c) 2020 Konduit K.K. | ||
* * | ||
* * This program and the accompanying materials are made available under the | ||
* * terms of the Apache License, Version 2.0 which is available at | ||
* * https://www.apache.org/licenses/LICENSE-2.0. | ||
* * | ||
* * Unless required by applicable law or agreed to in writing, software | ||
* * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* * License for the specific language governing permissions and limitations | ||
* * under the License. | ||
* * | ||
* * SPDX-License-Identifier: Apache-2.0 | ||
* ***************************************************************************** | ||
*/ | ||
|
||
package ai.konduit.serving.data.javacv.data; | ||
|
||
import ai.konduit.serving.data.javacv.util.OpenCVUtil; | ||
import ai.konduit.serving.pipeline.impl.data.image.BaseImage; | ||
import org.opencv.core.Mat; | ||
|
||
public class OpenCVMatImage extends BaseImage<Mat> { | ||
|
||
static { | ||
OpenCVUtil.ensureOpenCVLoaded(); | ||
} | ||
|
||
public OpenCVMatImage(Mat image) { | ||
super(image); | ||
} | ||
} |
Oops, something went wrong.