Skip to content

Commit 454a556

Browse files
authored
V3 Yolo model type deduction (#1225)
1 parent ac36cef commit 454a556

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,7 @@ _builds/
4242
*.swp
4343
/env
4444

45-
.history/
45+
.history/
46+
47+
.compile_commands.json
48+
.depthai_cached_models/

cmake/Depthai/DepthaiDeviceRVC4Config.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ set(DEPTHAI_DEVICE_RVC4_MATURITY "snapshot")
44

55
# "version if applicable"
66
# set(DEPTHAI_DEVICE_RVC4_VERSION "0.0.1+93f7b75a885aa32f44c5e9f53b74470c49d2b1af")
7-
set(DEPTHAI_DEVICE_RVC4_VERSION "0.0.1+28f80c4c2b38b90e83d2cfc53575b0e1cdb730de")
7+
set(DEPTHAI_DEVICE_RVC4_VERSION "0.0.1+c83c0a4c122823e3256accef3ec05b1ceb67ce41")

cmake/Depthai/DepthaiDeviceSideConfig.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")
33

44
# "full commit hash of device side binary"
5-
set(DEPTHAI_DEVICE_SIDE_COMMIT "28e44473f9c42ece1dadfea80d2077cde74f7301")
5+
set(DEPTHAI_DEVICE_SIDE_COMMIT "911d3cddf2259bc77cc6f3939252cfd72da927ea")
66

77
# "version if applicable"
88
set(DEPTHAI_DEVICE_SIDE_VERSION "")

examples/cpp/Visualizer/visualizer_yolo.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ int main(int argc, char** argv) {
3535
// Set up topics for remote connection
3636
remoteConnector.addTopic("detections", detectionNetwork->out);
3737
remoteConnector.addTopic("images", *cameraOutputVisualize);
38-
remoteConnector.registerPipeline(pipeline);
3938
pipeline.start();
4039

40+
remoteConnector.registerPipeline(pipeline);
4141
// Main loop
4242
while(isRunning && pipeline.isRunning()) {
4343
int key = remoteConnector.waitKey(1);

include/depthai/common/DetectionParserOptions.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace dai {
1313
struct DetectionParserOptions {
1414
/// Generic Neural Network properties
1515
DetectionNetworkType nnFamily;
16+
std::string subtype;
1617
float confidenceThreshold;
1718

1819
/// YOLO specific network properties
@@ -25,6 +26,6 @@ struct DetectionParserOptions {
2526
float iouThreshold;
2627
};
2728

28-
DEPTHAI_SERIALIZE_EXT(DetectionParserOptions, nnFamily, confidenceThreshold, classes, coordinates, anchors, anchorMasks, anchorsV2, iouThreshold);
29+
DEPTHAI_SERIALIZE_EXT(DetectionParserOptions, nnFamily, subtype, confidenceThreshold, classes, coordinates, anchors, anchorMasks, anchorsV2, iouThreshold);
2930

3031
} // namespace dai

src/pipeline/node/DetectionParser.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ void DetectionParser::setConfig(const dai::NNArchiveVersionedConfig& config) {
7575

7676
if(head.parser == "YOLO") {
7777
properties.parser.nnFamily = DetectionNetworkType::YOLO;
78+
if(head.metadata.subtype){
79+
properties.parser.subtype = *head.metadata.subtype;
80+
}
7881
} else if(head.parser == "SSD" || head.parser == "MOBILENET") {
7982
properties.parser.nnFamily = DetectionNetworkType::MOBILENET;
8083
} else {

0 commit comments

Comments
 (0)