-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dnn tab and start poking at backend
- Loading branch information
Showing
12 changed files
with
502 additions
and
287 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,48 @@ | ||
<script setup lang="ts"> | ||
import { useCameraSettingsStore } from "@/stores/settings/CameraSettingsStore"; | ||
import { PipelineType } from "@/types/PipelineTypes"; | ||
import PvSelect from "@/components/common/pv-select.vue"; | ||
import PvSlider from "@/components/common/pv-slider.vue"; | ||
import PvSwitch from "@/components/common/pv-switch.vue"; | ||
import { computed, getCurrentInstance } from "vue"; | ||
import { useStateStore } from "@/stores/StateStore"; | ||
// TODO fix pipeline typing in order to fix this, the store settings call should be able to infer that only valid pipeline type settings are exposed based on pre-checks for the entire config section | ||
// Defer reference to store access method | ||
const currentPipelineSettings = useCameraSettingsStore().currentPipelineSettings; | ||
const interactiveCols = computed( | ||
() => | ||
(getCurrentInstance()?.proxy.$vuetify.breakpoint.mdAndDown || false) && | ||
(!useStateStore().sidebarFolded || useCameraSettingsStore().isDriverMode) | ||
) | ||
? 9 | ||
: 8; | ||
const models = () => { | ||
return ["a", "bcd"] | ||
} | ||
</script> | ||
|
||
<template> | ||
<div v-if="currentPipelineSettings.pipelineType === PipelineType.Dnn"> | ||
<pv-select | ||
v-model="currentPipelineSettings.modelIndex" | ||
label="Target family" | ||
:items = models | ||
:select-cols="interactiveCols" | ||
@input="(value) => useCameraSettingsStore().changeCurrentPipelineSetting({ tagFamily: value }, false)" | ||
/> | ||
<pv-slider | ||
v-model="currentPipelineSettings.confidence" | ||
class="pt-2" | ||
:slider-cols="interactiveCols" | ||
label="Confidence" | ||
tooltip="asdf" | ||
:min="0" | ||
:max="1" | ||
:step="-1" | ||
@input="(value) => useCameraSettingsStore().changeCurrentPipelineSetting({ decimate: value }, false)" | ||
/> | ||
</div> | ||
</template> |
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
14 changes: 14 additions & 0 deletions
14
photon-core/src/main/java/org/photonvision/vision/pipe/impl/NeuralNetworkPipeResult.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,14 @@ | ||
package org.photonvision.vision.pipe.impl; | ||
|
||
import org.opencv.core.Rect2d; | ||
|
||
public class NeuralNetworkPipeResult { | ||
public NeuralNetworkPipeResult(Rect2d box2, Integer integer, Float float1) { | ||
box = box2; | ||
classIdx = integer; | ||
confidence = float1; | ||
} | ||
public final int classIdx; | ||
public final Rect2d box; | ||
public final double confidence; | ||
} |
Oops, something went wrong.