Add pruned_62k checkpoint (5.9 mAP, 30K weights zeroed, mAP improved), fix pruner naming
Browse files- heads/cofiber_threshold/box32_92k/cofiber_threshold_box32_coco_8ep_pruned_62k.pth +3 -0
- heads/cofiber_threshold/box32_92k/cofiber_threshold_box32_coco_8ep_pruned_62k_eval.json +8 -0
- outputs/cofiber_threshold_v2/head_final_pruned_pruned.pth +3 -0
- outputs/cofiber_threshold_v2/head_final_pruned_pruned_coco_summary.json +8 -0
- prune.py +5 -4
heads/cofiber_threshold/box32_92k/cofiber_threshold_box32_coco_8ep_pruned_62k.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bcb34ee30c831e53c4d90a2e8c8997d2f6df9a0a95a4c46df0d982cc6fcc0429
|
| 3 |
+
size 372635
|
heads/cofiber_threshold/box32_92k/cofiber_threshold_box32_coco_8ep_pruned_62k_eval.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"mAP_0.5_0.95": 0.05855484237101895,
|
| 3 |
+
"mAP_0.50": 0.20410501909047038,
|
| 4 |
+
"mAP_0.75": 0.014814163264790318,
|
| 5 |
+
"mAP_small": 0.02203082535241185,
|
| 6 |
+
"mAP_medium": 0.06371689189204269,
|
| 7 |
+
"mAP_large": 0.08569745781602053
|
| 8 |
+
}
|
outputs/cofiber_threshold_v2/head_final_pruned_pruned.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bcb34ee30c831e53c4d90a2e8c8997d2f6df9a0a95a4c46df0d982cc6fcc0429
|
| 3 |
+
size 372635
|
outputs/cofiber_threshold_v2/head_final_pruned_pruned_coco_summary.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"mAP_0.5_0.95": 0.05855484237101895,
|
| 3 |
+
"mAP_0.50": 0.20410501909047038,
|
| 4 |
+
"mAP_0.75": 0.014814163264790318,
|
| 5 |
+
"mAP_small": 0.02203082535241185,
|
| 6 |
+
"mAP_medium": 0.06371689189204269,
|
| 7 |
+
"mAP_large": 0.08569745781602053
|
| 8 |
+
}
|
prune.py
CHANGED
|
@@ -312,12 +312,13 @@ def main():
|
|
| 312 |
head = prune(head, features, gt_data, locs, args.param,
|
| 313 |
passes=args.passes, batch_size=args.batch_size, threshold=args.threshold)
|
| 314 |
|
| 315 |
-
# Save
|
|
|
|
|
|
|
| 316 |
out_dir = os.path.dirname(args.checkpoint)
|
| 317 |
-
|
| 318 |
-
out_path = os.path.join(out_dir, base)
|
| 319 |
torch.save(head.state_dict(), out_path)
|
| 320 |
-
print(f"\nSaved: {out_path}")
|
| 321 |
|
| 322 |
|
| 323 |
if __name__ == "__main__":
|
|
|
|
| 312 |
head = prune(head, features, gt_data, locs, args.param,
|
| 313 |
passes=args.passes, batch_size=args.batch_size, threshold=args.threshold)
|
| 314 |
|
| 315 |
+
# Save — name by nonzero count, not input filename
|
| 316 |
+
total_nonzero = sum((p != 0).sum().item() for p in head.parameters())
|
| 317 |
+
nonzero_k = int(total_nonzero / 1000)
|
| 318 |
out_dir = os.path.dirname(args.checkpoint)
|
| 319 |
+
out_path = os.path.join(out_dir, f"{args.head}_pruned_{nonzero_k}k.pth")
|
|
|
|
| 320 |
torch.save(head.state_dict(), out_path)
|
| 321 |
+
print(f"\nSaved: {out_path} ({total_nonzero:,} nonzero params)", flush=True)
|
| 322 |
|
| 323 |
|
| 324 |
if __name__ == "__main__":
|