-
Notifications
You must be signed in to change notification settings - Fork 39
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
KeyError when running models #11
Comments
Dear @carsen-stringer, We might have narrowed down the potential problem, it seems like the ResNeSt code uses its own fork of detectron2 and in that have changed a defaults.py file to reflect the inclusion of the RADIX variable that is controlled from the config file. They still use the package name detectron2, so when they later on import their custom code it is done as:
Since the default detectron2 does not have ResNeSt changes, we get the key error you posted. Solution
Then you should be able to run the code via the command you wrote.
Please confirm if this fixed the problem, we will update our install instructions accordingly if that is the case. Kindly, |
Thank you so much for the fast and thorough response, my bad, I thought installing a premade wheel from detectron2 was fine, maybe a warning for lazy people like me would be helpful :) I've gone ahead with the anchor free since the detectron2 install worked without issues! One note, the dataset registration instructions are also a little confusing. I found that I had to put all the test images into a single folder but that is not the format in which you provide the data (after unzipping
Also I found that when I added the import to your
I then changed the call to input
The AP values look good though. I am not sure how to process the instance outputs, they look only like boxes and not full masks and they are not in the same format as the |
Thank you for all the great feedback @carsen-stringer, it is very helpful. InstallationWe have now updated the install documentation to reflect the two different install instructions. DataYou are correct that the cell images are packaged by cell type and not in a flat structure (as is needed when training), I will see if we can change this to make it easier to use our resource. EvalRegarding the evaluation, there seems that changes in the API since we wrote the code is generating that error. I would recommend to use the default evaluation from centermask2 instead of our script right now. The downside is that you will not get all the metrics that we calculate, but it should work and you will get the AP metrics. Using the instancesRegarding the model output, it is in the detectron2 output standard that is explained in their documentation. I am afraid it is not a trivial format to work with and agree that a script to convert it to COCO would be benficial. We have also played around with the thought of hosting an API (similar to a certain cellpose model ;) ) but have not decided on anything yet. For now, I am afraid that the provided detectron2 documentation is the fastest solution. To visualize the results of the anchor-free model i would recommend the demo code in the centermask2 repo, it is based on the detectron2 demo code and usage is described here. I will add this info to our documentation page and update this issue when it is done. Once again, thank you for bringing all of this to our attention. Let me know if there is more things I can support you with. |
Short update: DataThe downloaded images is now in a flat structure to support a more plug-and play approach. EvalThe coco_evaluation.py script is updated to work with latest centermask2 and detectron2. It still supports up to 2000 detections per image and prints the mAP for the different IoU thresholds for both precision and recall. Would appreciate to know if it works for you as well. |
Thanks for the great data release and model release!
Unfortunately I have received this error: chongruo/detectron2-ResNeSt#54, when trying to run both the anchor-free and anchor-based models. I'm using Ubuntu 18.04 OS, torch v1.10, cudatoolkit=11.3.
My apologies if I did not understand the install directions. I installed
detectron2
using the instructions from the facebook page usingpython -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/index.html
. Then I cloned the two repos as suggested andcd
'ed into them to run theirtrain_net.py
script.I used the LIVECell config file with the only modification being the path to the images, I was not sure if there was another script I needed to run? Then I ran the following command in the
detectron2-ResNeSt
folderand received the error:
I also tried using the author's new repo and then received a different key error. When trying to directly
pip install -e .
in their repo I received several errors in the build which I could not figure out how to resolve (tried their suggestions but failed). Do you perhaps have more detailed instructions for installingdetectron2
from source from their repo if that's what's required?Thanks!
The text was updated successfully, but these errors were encountered: