Skip to content

Commit aef27fc

Browse files
author
Matevz Morato
committed
Add missing implementation for the getClasses
1 parent 57ac977 commit aef27fc

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

include/depthai/pipeline/node/SpatialDetectionNetwork.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ class SpatialDetectionNetwork : public DeviceNodeCRTP<DeviceNode, SpatialDetecti
228228
*/
229229
void setSpatialCalculationStepSize(int stepSize);
230230

231+
/// Get classes labels
232+
std::optional<std::vector<std::string>> getClasses() const;
233+
231234
protected:
232235
using DeviceNodeCRTP::DeviceNodeCRTP;
233236

@@ -266,8 +269,7 @@ class YoloSpatialDetectionNetwork : public DeviceNodeCRTP<SpatialDetectionNetwor
266269

267270
/// Get num classes
268271
int getNumClasses() const;
269-
/// Get classes labels
270-
std::optional<std::vector<std::string>> getClasses() const;
272+
271273
/// Get coordianate size
272274
int getCoordinateSize() const;
273275
/// Get anchors

src/pipeline/node/SpatialDetectionNetwork.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ void SpatialDetectionNetwork::setSpatialCalculationStepSize(int stepSize) {
117117
properties.stepSize = stepSize;
118118
}
119119

120+
std::optional<std::vector<std::string>> SpatialDetectionNetwork::getClasses() const {
121+
return detectionParser->getClasses();
122+
}
123+
120124
//--------------------------------------------------------------------
121125
// MobileNet
122126
//--------------------------------------------------------------------
@@ -160,10 +164,6 @@ int YoloSpatialDetectionNetwork::getNumClasses() const {
160164
return detectionParser->getNumClasses();
161165
}
162166

163-
std::optional<std::vector<std::string>> YoloSpatialDetectionNetwork::getClasses() const {
164-
return detectionParser->getClasses();
165-
}
166-
167167
/// Get coordianate size
168168
int YoloSpatialDetectionNetwork::getCoordinateSize() const {
169169
return detectionParser->getCoordinateSize();

0 commit comments

Comments
 (0)