Skip to content

Commit e0c81ac

Browse files
committed
lint
1 parent 10ed645 commit e0c81ac

File tree

5 files changed

+13
-16
lines changed

5 files changed

+13
-16
lines changed

photon-client/src/components/settings/ObjectDetectionCard.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ const handleBulkImport = () => {
320320
<v-card-text>
321321
<span v-if="useSettingsStore().general.supportedBackends?.includes('RKNN')"
322322
>Upload a new object detection model to this device that can be used in a pipeline. Note that ONLY
323-
640x640 YOLOv5, YOLOv8, YOLOv11, and YOLOv11 OBB models trained and converted to `.rknn` format for RK3588 SOCs are
324-
currently supported!</span
323+
640x640 YOLOv5, YOLOv8, YOLOv11, and YOLOv11 OBB models trained and converted to `.rknn` format for
324+
RK3588 SOCs are currently supported!</span
325325
>
326326
<span v-else-if="useSettingsStore().general.supportedBackends?.includes('RUBIK')"
327327
>Upload a new object detection model to this device that can be used in a pipeline. Note that ONLY

photon-core/src/main/java/org/photonvision/vision/objects/Letterbox.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import org.opencv.core.Core;
2323
import org.opencv.core.Mat;
2424
import org.opencv.core.Point;
25-
import org.opencv.core.Rect2d;
2625
import org.opencv.core.RotatedRect;
2726
import org.opencv.core.Scalar;
2827
import org.opencv.core.Size;

photon-core/src/main/java/org/photonvision/vision/objects/RknnModel.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ public RknnModel(ModelProperties properties) throws IllegalArgumentException {
5555
&& properties.version() != Version.YOLOV8
5656
&& properties.version() != Version.YOLOV11
5757
&& properties.version() != Version.YOLOV11OBB) {
58-
throw new IllegalArgumentException("Model version must be YOLOV5, YOLOV8, YOLOV11, or YOLOV11OBB");
58+
throw new IllegalArgumentException(
59+
"Model version must be YOLOV5, YOLOV8, YOLOV11, or YOLOV11OBB");
5960
}
6061

6162
this.properties = properties;

photon-core/src/main/java/org/photonvision/vision/pipe/impl/FilterObjectDetectionsPipe.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,15 @@ protected List<NeuralNetworkPipeResult> process(List<NeuralNetworkPipeResult> in
4343

4444
private void filterContour(NeuralNetworkPipeResult contour) {
4545
var boc = contour.bbox();
46-
46+
4747
// Area filtering
4848
double areaPercentage = boc.size.area() / params.frameStaticProperties().imageArea * 100.0;
4949
double minAreaPercentage = params.area().getFirst();
5050
double maxAreaPercentage = params.area().getSecond();
5151
if (areaPercentage < minAreaPercentage || areaPercentage > maxAreaPercentage) return;
5252

5353
// Aspect Ratio Filtering.
54-
double aspectRatio =
55-
TargetCalculations.getAspectRatio(boc, params.isLandscape());
54+
double aspectRatio = TargetCalculations.getAspectRatio(boc, params.isLandscape());
5655
if (aspectRatio < params.ratio().getFirst() || aspectRatio > params.ratio().getSecond()) return;
5756

5857
m_filteredContours.add(contour);

photon-core/src/main/java/org/photonvision/vision/pipe/impl/NeuralNetworkPipeResult.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,14 @@
2323
import org.opencv.core.Size;
2424

2525
public record NeuralNetworkPipeResult(RotatedRect bbox, int classIdx, double confidence) {
26-
public NeuralNetworkPipeResult(Rect2d rect, int classIdx, double confidence) {
26+
public NeuralNetworkPipeResult(Rect2d rect, int classIdx, double confidence) {
2727
// turn the axis-aligned rect into a RotatedRect with angle 0 degrees
2828
this(
29-
new RotatedRect(
30-
new Point(rect.x + (rect.width) / 2, rect.y + (rect.height) / 2),
31-
new Size(rect.width, rect.height),
32-
0.0
33-
),
34-
classIdx,
35-
confidence
36-
);
29+
new RotatedRect(
30+
new Point(rect.x + (rect.width) / 2, rect.y + (rect.height) / 2),
31+
new Size(rect.width, rect.height),
32+
0.0),
33+
classIdx,
34+
confidence);
3735
}
3836
}

0 commit comments

Comments
 (0)