You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
traccuracy version: main branch vs f8c982c57b8aa92ac8ab5410318ad2b20c0c6f76
Python version: 3.10.13
Operating System: Ubuntu 22.04
Description
The recent changes are considerably slowing down the evaluation of FP/FN edges. For the example below, one of the phase contrast datasets from the CTC, I get an estimate of 01:45h. With commit f8c982c57b8aa92ac8ab5410318ad2b20c0c6f76, which I was using until just now, this evaluation gets done in only seconds.
What I Did
I slightly adapted the example, to simply compare GT vs GT of a slightly larger CTC dataset:
importosfrompathlibimportPathimportpprintimporturllib.requestimportzipfilefromtqdmimporttqdmfromtraccuracyimportrun_metricsfromtraccuracy.loadersimportload_ctc_datafromtraccuracy.matchersimportCTCMatched, IOUMatchedfromtraccuracy.metricsimportCTCMetrics, DivisionMetricspp=pprint.PrettyPrinter(indent=4)
url="http://data.celltrackingchallenge.net/training-datasets/PhC-C2DL-PSC.zip"data_dir="downloads"ifnotos.path.exists(data_dir):
os.mkdir(data_dir)
filename=url.split("/")[-1]
file_path=os.path.join(data_dir, filename)
ds_name=filename.split(".")[0]
# Add a utility to make a progress bar when downloading the fileclassDownloadProgressBar(tqdm):
defupdate_to(self, b=1, bsize=1, tsize=None):
iftsizeisnotNone:
self.total=tsizeself.update(b*bsize-self.n)
ifnotos.path.exists(file_path):
print(f"Downloading {ds_name} data from the CTC website")
# Downloading datawithDownloadProgressBar(
unit="B", unit_scale=True, miniters=1, desc=url.split("/")[-1]
) ast:
urllib.request.urlretrieve(url, file_path, reporthook=t.update_to)
# Unzip the data# TODO add a progress bar to zip as wellwithzipfile.ZipFile(file_path, "r") aszip_ref:
zip_ref.extractall(data_dir)
gt_data=load_ctc_data(
"downloads/PhC-C2DL-PSC/01_GT/TRA", "downloads/PhC-C2DL-PSC/01_GT/TRA/man_track.txt"
)
pred_data=load_ctc_data(
"downloads/PhC-C2DL-PSC/01_GT/TRA", "downloads/PhC-C2DL-PSC/01_GT/TRA/man_track.txt"
)
ctc_results=run_metrics(gt_data=gt_data, pred_data=pred_data, matcher=CTCMatched, metrics=[CTCMetrics, DivisionMetrics],)
pp.pprint(ctc_results)
The text was updated successfully, but these errors were encountered:
main
branch vsf8c982c57b8aa92ac8ab5410318ad2b20c0c6f76
Description
The recent changes are considerably slowing down the evaluation of FP/FN edges. For the example below, one of the phase contrast datasets from the CTC, I get an estimate of 01:45h. With commit
f8c982c57b8aa92ac8ab5410318ad2b20c0c6f76
, which I was using until just now, this evaluation gets done in only seconds.What I Did
I slightly adapted the example, to simply compare GT vs GT of a slightly larger CTC dataset:
The text was updated successfully, but these errors were encountered: