question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

compute_stats.py [for type mode]

See original GitHub issue

I failed to get compute_stats output using this command:

python compute_stats.py --mode=type --pred_dir=/home/hovernet/mydrive/HoverNet/hover_net/logs/infer_output/mat --true_dir=/home/hovernet/mydrive/HoverNet/hover_net/dataset/CoNSeP/Test/Labels

Traceback (most recent call last): File “compute_stats.py”, line 248, in <module> run_nuclei_type_stat(args.pred_dir, args.true_dir) File “compute_stats.py”, line 104, in run_nuclei_type_stat paired_all = np.concatenate(paired_all, axis=0) File “<array_function internals>”, line 6, in concatenate ValueError: need at least one array to concatenate

Apparently, the code failed to get the correct .mat files in the predictions folder. After opening the prediction .mat file, I only got “inst_map” and inst_type. I wonder there is no “inst_centroid” in the prediction folder got through inference.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
MTalhaAbdullahcommented, Jul 4, 2021

@vqdang Thank you so much, now it’s working. I just had to add “/” at the end of the path to make it run.

1reaction
MTalhaAbdullahcommented, Jul 1, 2021

I failed to get compute_stats output using this command:

python compute_stats.py --mode=type --pred_dir=/home/hovernet/mydrive/HoverNet/hover_net/logs/infer_output/mat --true_dir=/home/hovernet/mydrive/HoverNet/hover_net/dataset/CoNSeP/Test/Labels

Traceback (most recent call last): File “compute_stats.py”, line 248, in run_nuclei_type_stat(args.pred_dir, args.true_dir) File “compute_stats.py”, line 104, in run_nuclei_type_stat paired_all = np.concatenate(paired_all, axis=0) File “<array_function internals>”, line 6, in concatenate ValueError: need at least one array to concatenate

Apparently, the code failed to get the correct .mat files in the predictions folder. After opening the prediction .mat file, I only got “inst_map” and inst_type. I wonder there is no “inst_centroid” in the prediction folder got through inference.

Same issue as earlier, maybe the order of dictionary keys in prediction .mat files causing error. Shouldn’t the order of inst_uid and inst_type be the same as GT ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

COMPUTE STATS Statement | 6.3.x - Cloudera Documentation
The COMPUTE STATS statement gathers information about volume and distribution of data in a table and all associated columns and partitions.
Read more >
Document.ComputeStatistics method (Word) - Microsoft Learn
A variable that represents a Document object. Parameters. Name, Required/Optional, Data type, Description. Statistic, Required, WdStatistic, The ...
Read more >
COMPUTE STATS Statement - Cloudera Manager
Gathers information about volume and distribution of data in a table and all associated columns and partitions. The information is stored in the...
Read more >
mode() function in Python statistics module - GeeksforGeeks
Syntax : mode([data-set]) Parameters : [data-set] which is a tuple, list or a iterator of real valued numbers as well as Strings. Return...
Read more >
GDALRasterBand Class Reference - GDAL
Read/write a region of image data for this band. More. ... CPLErr GDALRasterBand::ComputeStatistics, (, int, bApproxOK,. double *, pdfMin,.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found