Skip to content

Commit

Permalink
♻️ [Update] pycoco with faster coco, fast validate
Browse files Browse the repository at this point in the history
  • Loading branch information
henrytsui000 committed Dec 23, 2024
1 parent b96c8ea commit 3e180a7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ gradio
pytest
pytest-cov
pre-commit
pycocotools
tensorboard
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
einops
faster-coco-eval
graphviz
hydra-core
lightning
loguru
numpy
opencv-python
Pillow
pycocotools
requests
rich
torch
Expand Down
2 changes: 1 addition & 1 deletion yolo/tools/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, cfg: Config):
self.validation_cfg = self.cfg.task
else:
self.validation_cfg = self.cfg.task.validation
self.metric = MeanAveragePrecision(iou_type="bbox", box_format="xyxy")
self.metric = MeanAveragePrecision(iou_type="bbox", box_format="xyxy", backend="faster_coco_eval")
self.metric.warn_on_many_detections = False
self.val_loader = create_dataloader(self.validation_cfg.data, self.cfg.dataset, self.validation_cfg.task)
self.ema = self.model
Expand Down
3 changes: 3 additions & 0 deletions yolo/utils/logging_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ def format(self, record, emoji=":high_voltage:"):
if quite:
rich_logger.setLevel(logging.ERROR)

coco_logger = logging.getLogger("faster_coco_eval.core.cocoeval")
coco_logger.setLevel(logging.ERROR)


def setup(cfg: Config):
quite = hasattr(cfg, "quite")
Expand Down

0 comments on commit 3e180a7

Please sign in to comment.