Skip to content

Commit 669141f

Browse files
authored
Merge pull request #149 from AIRInstitute/pre
Pre
2 parents 4a43855 + 15a95bd commit 669141f

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

ia4birds-all/ai4birds-web/ai4birds-web-app-frontend/src/assets/components/card/CameraPanelCardTable.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,14 @@ export const CustomCardCameraTable = ({ cameraPanelData, onDelete }) => {
5353
const parseDetections = (frames: SegmentData["frames"]): ParsedDetection[] => {
5454
if (!frames) return [];
5555

56+
console.log("Raw frames received in parseDetections:", frames);
57+
58+
5659
return Object.entries(frames).flatMap(([frameNumber, detections]) => {
5760
if (!Array.isArray(detections)) return [];
5861

5962
return detections.map((detection) => {
63+
console.log(`Parsing detection in frame ${frameNumber}:`, detection);
6064
const distances = detection.distances || {};
6165
const speciesEntries = Object.entries(distances);
6266

@@ -76,14 +80,18 @@ export const CustomCardCameraTable = ({ cameraPanelData, onDelete }) => {
7680
confianza = (100 - bestDistance).toFixed(1);
7781
}
7882

79-
return {
83+
const parsed = {
8084
frame: frameNumber,
8185
idAve: `AVE${String(detection.id_ave).padStart(3, "0")}`,
8286
coordenadas: `X1: ${Math.round(detection.coordenadas[0])}, Y1: ${Math.round(detection.coordenadas[1])}`,
8387
area: `${detection.area.toFixed(1)} px²`,
8488
especieProbable: probableSpecies,
8589
confianza,
8690
};
91+
92+
console.log("Parsed detection:", parsed);
93+
94+
return parsed;
8795
});
8896
});
8997
};

0 commit comments

Comments
 (0)