Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accurary implementation? #46

Closed
ilyes-hamrouni opened this issue Aug 2, 2019 · 3 comments
Closed

Accurary implementation? #46

ilyes-hamrouni opened this issue Aug 2, 2019 · 3 comments
Labels
enhancement New feature or request inference

Comments

@ilyes-hamrouni
Copy link

Is there anyone who added some accuracy to the detection or training?

@DeltaTesting
Copy link

I've done so on a custom detection script that i use to choose the checkpoint with better results on my validation dataset. I won't share the code since is very specyfic for my dataset, but the pseudo code would be:

for checkpoint in checkpoints:
-model.load_weights(checkpoint)
-for img, labels in val_dataset:
--boxes, scores, classes, nums = model.predict(img)
--labels2 = labels.copy()
--acc = 0
--for i in range(nums[0]):
---box = boxes[0][i]
---c = classes[0][i]
---for l in labels2:
----gt_box = getBox(l)
----if boxesIntersect(box, gtbox) and sameClass(c, l):
-----acc += 1
-----labels2.remove(l)
-----break
--accuracy = acc / len(labels)

@zzh8829 zzh8829 added enhancement New feature or request inference labels Dec 21, 2019
@zzh8829
Copy link
Owner

zzh8829 commented Dec 21, 2019

merging with #125

@zzh8829 zzh8829 closed this as completed Dec 21, 2019
@ethanyanjiali
Copy link

@DeltaTesting it seems like in your code, one detection (predicted box) would just match the first ground truth box that satisfy the iou and class condition. so if that particular ground truth box is better to be matched with another detection, there would be a miss here. Does your dataset mostly just contains one bounding box, or are those ground truth boxes usually not close with each other?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request inference
Projects
None yet
Development

No branches or pull requests

4 participants