Deci-AI / super-gradients

Easily train or fine-tune SOTA computer vision models with one open source training library. The home of Yolo-NAS.
https://www.supergradients.com
Apache License 2.0
4.59k stars 510 forks source link

Cannot see metric on testing #1279

Closed gsrujana closed 1 year ago

gsrujana commented 1 year ago

πŸ› Describe the bug

This script just outputs as below. But no metrics are displayed. Please help. How to get map@0.5:0.5 Test: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 43/43 [00:09<00:00, 4.61it/s] Test: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 43/43 [00:09<00:00, 4.57it/s] Test: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 43/43 [00:09<00:00, 4.53it/s] Test: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 43/43 [00:09<00:00, 4.52it/s]

trainer.test(
    model=best_model,
    test_loader=test_data,
    test_metrics_list=DetectionMetrics_050_095(
        score_thres=0.1, 
        top_k_predictions=300, 
        num_cls=len(dataset_params['classes']), 
        normalize_targets=True, 
        post_prediction_callback=PPYoloEPostPredictionCallback(
            score_threshold=0.01, 
            nms_top_k=1000, 
            max_predictions=300,                                                                              
            nms_threshold=0.7
        )
    )
)

Versions

ersions of relevant libraries: [pip3] numpy==1.23.0 [pip3] torch==1.12.1 [pip3] torch-model-archiver==0.5.3b20220226 [pip3] torch-workflow-archiver==0.2.4b20220513 [pip3] torchaudio==0.12.1 [pip3] torchinfo==1.8.0 [pip3] torchmetrics==0.8.0 [pip3] torchserve==0.6.0b20220513 [pip3] torchtext==0.13.1 [pip3] torchvision==0.13.1 [conda] blas 2.116 mkl conda-forge [conda] blas-devel 3.9.0 16_linux64_mkl conda-forge [conda] captum 0.5.0 0 pytorch [conda] cudatoolkit 11.6.0 hecad31d_10 conda-forge [conda] libblas 3.9.0 16_linux64_mkl conda-forge [conda] libcblas 3.9.0 16_linux64_mkl conda-forge [conda] liblapack 3.9.0 16_linux64_mkl conda-forge [conda] liblapacke 3.9.0 16_linux64_mkl conda-forge [conda] magma-cuda116 2.6.1 1 pytorch [conda] mkl 2022.1.0 h84fe81f_915 conda-forge [conda] mkl-devel 2022.1.0 ha770c72_916 conda-forge [conda] mkl-include 2022.1.0 h84fe81f_915 conda-forge [conda] numpy 1.23.0 pypi_0 pypi [conda] pytorch 1.12.1 py3.9_cuda11.6_cudnn8.3.2_0 pytorch [conda] pytorch-mutex 1.0 cuda pytorch [conda] torch-model-archiver 0.5.3 py39_0 pytorch [conda] torch-workflow-archiver 0.2.4 py39_0 pytorch [conda] torchaudio 0.12.1 py39_cu116 pytorch [conda] torchinfo 1.8.0 pypi_0 pypi [conda] torchmetrics 0.8.0 pypi_0 pypi [conda] torchserve 0.6.0 py39_0 pytorch [conda] torchtext 0.13.1 py39 pytorch [conda] torchvision 0.13.1 py39_cu116 pytorch

shaydeci commented 1 year ago

Hello @gsrujana, you can easily print the results dictionary returned by test:

results = trainer.test(...)
print(results)
harpreetsahota204 commented 1 year ago

Hi @gsrujana

Thanks for opening an issue for SG. I'm gathering some feedback on SuperGradients and YOLO-NAS.

Would you be down for a quick call to chat about your experience?

If a call doesn't work for you, no worries. I've got a short survey you could fill out: https://bit.ly/sgyn-feedback.

I know you’re super busy, but your input will help us shape the direction of SuperGradients and make it as useful as possible for you.

I appreciate your time and feedback. Let me know what works for you.

Cheers,

Harpreet