update template code

This commit is contained in:
phatakmr
2025-10-13 14:48:00 +02:00
parent c9d159fcc6
commit 8f637a4a0d
46 changed files with 2955 additions and 1 deletions

40
mmp/a6/main.py Normal file
View File

@@ -0,0 +1,40 @@
from typing import List, Tuple
import torch
import numpy as np
from ..a5.model import MmpNet
from ..a3.annotation import AnnotationRect
def batch_inference(
model: MmpNet, images: torch.Tensor, device: torch.device, anchor_grid: np.ndarray
) -> List[List[Tuple[AnnotationRect, float]]]:
raise NotImplementedError()
def evaluate() -> float: # feel free to change the arguments
"""Evaluates a specified model on the whole validation dataset.
@return: AP for the validation set as a float.
You decide which arguments this function should receive
"""
raise NotImplementedError()
def evaluate_test(): # feel free to change the arguments
"""Generates predictions on the provided test dataset.
This function saves the predictions to a text file.
You decide which arguments this function should receive
"""
raise NotImplementedError()
def main():
"""Put the surrounding training code here. The code will probably look very similar to last assignment"""
raise NotImplementedError()
if __name__ == "__main__":
main()