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

Difference in CoNSeP results #817

Open
FabianHoerst opened this issue May 14, 2024 · 0 comments
Open

Difference in CoNSeP results #817

FabianHoerst opened this issue May 14, 2024 · 0 comments

Comments

@FabianHoerst
Copy link

  • TIA Toolbox version: 1.5.1
  • Python version: 3.11.9
  • Operating System: Ubuntu

Description

I tried to reproduce the CoNSeP results mentioned in the HoVerNet paper. For this, I used the test images of the CoNSeP dataset, performed inference and calculated the results given the compute_stats.py from the HoVerNet repository. However, I "just" achieve:
[ 0.8365, 0.5349, 0.6565, 0.7670, 0.5051]
vs. the referenced scores in the paper:
[ 0.8530, 0.5710, 0.7020, 0.7780, 0.5470]

What I Did

import logging
import warnings
import os
os.environ["HOME"] = "/home/jovyan/hovernet"

if logging.getLogger().hasHandlers():
    logging.getLogger().handlers.clear()

import cv2
import joblib
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
from pathlib import Path

from tiatoolbox import logger
from tiatoolbox.models.engine.nucleus_instance_segmentor import NucleusInstanceSegmentor
from tiatoolbox.utils.misc import download_data, imread
from natsort import natsorted as sorted

ON_GPU = True
INPUT_FOLDER = "consep-test-images"
OUTPUT_FOLDER = "results"

if __name__ == "__main__":
    filelist = [str(f) for f in sorted(Path(INPUT_FOLDER).glob("*.png"))]
    inst_segmentor = NucleusInstanceSegmentor(
        pretrained_model="hovernet_original-consep",
        num_loader_workers=4,
        num_postproc_workers=4,
        batch_size=4,
    )
    tile_output = inst_segmentor.predict(
        filelist,
        save_dir=OUTPUT_FOLDER,
        mode="tile",
        on_gpu=ON_GPU,
        crash_on_exception=True,
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant