Conversation
Setup Basic Tests Included Roboflow model tflite yolov8n trained
…ix type is cited from
This reverts commit e40f174.
…ale ui components in the Dashboard
…cronously investigate next
…ale ui components in the Dashboard
…cronously investigate next
…/DoctorFogarty/photonvision into bugfix-ui-loading-wrong-controls
…ancedPipelineSettings.java Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
…pipe/impl/SortContoursPipe.java
| * | ||
| * @return Optional containing the AprilTag model if found | ||
| */ | ||
| public Optional<Model> getDefaultAprilTagModel() { |
There was a problem hiding this comment.
is this ok? this seems potentially cursed
There was a problem hiding this comment.
specifically looking for "apriltag". Would this cause issues if an object detection model with "apriltag" (dumb, but you know...) in the name was used?
Would it be better to use getModelByName and specify the name? I assume that's how object ones work
Configurable max targets
…rols Bugfix UI loading wrong controls
| v-model="currentPipelineSettings.atrCornerRefinementEnabled" | ||
| :switch-cols="interactiveCols" | ||
| label="ATR Corner Refinement" | ||
| tooltip="Enables adaptive tag resizing corner refinement for improved accuracy when tags are scaled" |
There was a problem hiding this comment.
More like "... for improved speed when ML detected tags are large"?
| v-model="currentPipelineSettings.mlRoiExpansionFactor" | ||
| :slider-cols="interactiveCols" | ||
| label="ROI Expansion" | ||
| tooltip="Factor to expand detected regions for traditional decoding (1.0-2.0). Larger values help with edge cases" |
There was a problem hiding this comment.
"... at the cost of speed"? Maybe no room for that and maybe it's obvious
| :disabled="isTagPipeline" | ||
| <pv-slider | ||
| v-model="useCameraSettingsStore().currentPipelineSettings.outputMaximumTargets" | ||
| label="Maximum Targets" |
There was a problem hiding this comment.
"Maximum ML-detected Tags" is more clear maybe. obviously this was copy-pasted from object detection where more general language is needed
| v-model="currentPipelineSettings.mlNmsThreshold" | ||
| :slider-cols="interactiveCols" | ||
| label="NMS Threshold" | ||
| tooltip="Non-maximum suppression threshold for overlapping detections (0-1)" |
There was a problem hiding this comment.
i have no idea what this is. just leaving a comment here, no suggested fix rn
| targetModel: TargetModel.InfiniteRechargeHighGoalOuter, | ||
| ledMode: true, | ||
| outputShowMultipleTargets: false, | ||
| outputMaximumTargets: 20, |
There was a problem hiding this comment.
gonna suggest this goes to 127, but maybe the PV/Wave stuff already addresses this
| } | ||
|
|
||
| // === STAGE 4: POSE ESTIMATION happens in AprilTagPoseEstimatorPipe === | ||
| return deduplicateByTagId(allDetections); |
There was a problem hiding this comment.
why not check this on line R232? Then, if the detection in the second duplicate ROI is worse than the first one, you skip doing STAGE3 FINE REFINEMENT .
| int tagId = det.getId(); | ||
| AprilTagDetection existing = bestByTagId.get(tagId); | ||
|
|
||
| if (existing == null || det.getDecisionMargin() > existing.getDecisionMargin()) { |
There was a problem hiding this comment.
should probably accept the one with minimum Hamming distance before looking at DecisionMargin, in case the minimum Hamming setting is larger than 0.
getDecisionMargin is a good measure of accuracy only for very small tags.
https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/apriltag/AprilTagDetection.html#getDecisionMargin()
To be fair, there is no obvious better way to get a fast estimate of quality as far as I can tell. Given that this is operating on the same image, the quality is likely the same unless the corners of the real tag are eclipsed by the ROI.
| * along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
| */ | ||
|
|
||
| /* |
There was a problem hiding this comment.
probably shouldn't be removed?
|
|
||
| pipe.release(); | ||
| } | ||
| } |
There was a problem hiding this comment.
seems fine but i didn't manually verify that any of these are right. The tests are useful as far as i can tell
|
|
||
| pipeline.release(); | ||
| } | ||
| } |
There was a problem hiding this comment.
seems good, didn't manually review tests, just descriptions
…ackaged V8 model as I will replace it soon.
Added AI Assisted April Tag Detection
Includes Homography Transforms
Includes an experimental method for scaling the ROI so performance doesn't drop like a rock when the tag is in near vs far field frame of the camera.
Tries to keep reference frame correct to full frame image
Merge checklist: