freeman-lab on master
add missing argument (compare)
freeman-lab on master
finish fixes for db change (compare)
freeman-lab on master
minor fixes for db updates (compare)
neurofinder.load
, and got KeyError: 'coordinates'
on line 17 in main.py
. Any suggestions?
neurofinder.load(results[0]["regions"])
regions
field of one element of the results
array, just as you figured out!
@freeman-lab
I had a question about the code you use for scoring and the metrics in neurofinder-python/neurofinder/
both in main.py
and evaluate.py
.
From what I can tell, centers(a,b)
loops through each element in a
, finds the closest centroid in b
within a threshold, and removes that value from b
and moves on to the next region in a
. My question is what threshold do you typically use?
Also, why do you do the pairing in this way exactly. From what I can tell, I see a problem with this method in that depending on the threshold, the final scoring you get could be very dependent on the initial order of the regions in a
. There may be a value later in a
that better matches a region in b
that you assigned to a region in a
and then removed for your continual loops through the regions in a
. When it comes to an appropriate region in a
, the best fit was all ready removed and your final scoring may not be accurate. This would be especially important for cases where cells seem to have overlapping regions, as some of the ROIs do in the ground truth of the shared datasets.
It seems it would almost be more appropriate to determine a pairing scheme that would either do some sort of maximization over a score parameter, such as inclusion, or compute pairwise distances for each region in both a
and b
, then sort according to a
and remove the values in b
that are paired in a
based on the shortest centroid distances found.
Another comment related to the submission of .json files.
According to the instructions for submitting .json files here, (https://github.com/codeneuro/neurofinder#step-2-submit-your-algorithm) it might be worth altering these instructions due to the difference between indexing in Matlab and Python for the sake of submission. As written, if someone isn't aware of the differences and has only used Matlab, their algorithms will likely be at a disadvantage because Matlab is 1-indexed while Python is 0-indexed. For your example, converting a Matlab mask to the json file would likely never end up with a coordinate [0,1]
because it would probably be [1,2]
in Matlab. This will end up with their coordinates shifted by some degree. I'm assuming you aren't doing any matlab/python corrections on the back-end.
This could also be a problem on the ground truth submissions if submission labs primarily use Matlab over Python or visa-versa, though that might not actually be a problem. Just something I'd seen come up when working with other colleagues on these data that I thought I'd bring up.