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

Add notebook for nuclei segmentation using Voronoi-Otsu-Labeling, file loading, and result saving. #14

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

This message was generated by git-bob (version: 0.9.0, model: gpt-4o-2024-08-06, log), an experimental AI-based assistant. It can make mistakes and has limitations. Check its messages carefully.

The changes include the addition of a Jupyter notebook file, nuclei_segmentation_analysis.ipynb, which performs nuclei segmentation on a loaded image file using the Voronoi-Otsu-Labeling method. The image file, saved as human_mitosis_small.png, is processed by extracting the first channel, applying segmentation, and saving the resulting labels as an RGB PNG named labeled_nuclei.png. However, an error related to an undefined np was encountered during the conversion of the labeled image to RGB, which needs attention. The notebook provides necessary steps and outputs for nuclei segmentation analysis, aligning with the requirements of issue #13. Image

closes #13

…ynb', following the instructions for nuclei segmentation using Voronoi-Otsu-Labeling.
@haesleinhuepf
Copy link
Owner

Ok, this is almost perfect. Please visualize the input image using stackview.insight and also visualize the resulting labeled_image. Last but not least, you forgot to import nump as np at the beginning of the notebook.

git-bob implement this

Copy link
Contributor Author

This message was generated by git-bob (version: 0.9.0, model: gpt-4o-2024-08-06, log), an experimental AI-based assistant. It can make mistakes and has limitations. Check its messages carefully.

In this set of changes, I added the missing import for numpy in the nuclei_segmentation_analysis.ipynb notebook and visualized the input and labeled images with stackview.insight, while also correcting the metadata for execution. Additionally, two new image files were created: human_mitosis_small.png and labeled_nuclei.png. Also, a link to the nuclei_segmentation_analysis.ipynb file was added.

During solving this task, the following errors occurred:

  • Error during {'action': 'download', 'source_url': 'https://github.com/haesleinhuepf/git-bob-playground/blob/git-bob-mod-pWGnb0jNr4/nuclei_segmentation_analysis.ipynb', 'target_filename': 'nuclei_segmentation_analysis.ipynb'}: 422 {"message": "Invalid request.\n\n\"sha\" wasn't supplied.", "documentation_url": "https://docs.github.com/rest/repos/contents#create-or-update-file-contents", "status": "422"}
        Traceback (most recent call last):
        File "/home/runner/work/git-bob-playground/git-bob-playground/git-bob/src/git_bob/_github_utilities.py", line 837, in download_to_repository
          contents = repo.get_contents(target_filename)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/github/Repository.py", line 2204, in get_contents
          headers, data = self._requester.requestJsonAndCheck(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/github/Requester.py", line 550, in requestJsonAndCheck
          return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/github/Requester.py", line 611, in __check
          raise self.createException(status, responseHeaders, data)
      github.GithubException.UnknownObjectException: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/repos/contents#get-repository-content", "status": "404"}
    

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/home/runner/work/git-bob-playground/git-bob-playground/git-bob/src/git_bob/_ai_github_utilities.py", line 480, in solve_github_issue
    download_to_repository(repository, branch_name, source_url, target_filename)
    File "/home/runner/work/git-bob-playground/git-bob-playground/git-bob/src/git_bob/_github_utilities.py", line 843, in download_to_repository
    repo.create_file(target_filename, commit_message, image_content, branch=branch_name)
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/github/Repository.py", line 2457, in create_file
    headers, data = self._requester.requestJsonAndCheck(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/github/Requester.py", line 550, in requestJsonAndCheck
    return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/github/Requester.py", line 611, in __check
    raise self.createException(status, responseHeaders, data)
    github.GithubException.GithubException: 422 {"message": "Invalid request.\n\n"sha" wasn't supplied.", "documentation_url": "https://docs.github.com/rest/repos/contents#create-or-update-file-contents", "status": "422"}

  • Error during {'action': 'download', 'source_url': 'https://github.com/haesleinhuepf/git-bob-playground/blob/git-bob-mod-pWGnb0jNr4/human_mitosis_small.png?raw=true', 'target_filename': 'human_mitosis_small.png'}: 422 {"message": "Invalid request.\n\n\"sha\" wasn't supplied.", "documentation_url": "https://docs.github.com/rest/repos/contents#create-or-update-file-contents", "status": "422"}
        Traceback (most recent call last):
        File "/home/runner/work/git-bob-playground/git-bob-playground/git-bob/src/git_bob/_github_utilities.py", line 837, in download_to_repository
          contents = repo.get_contents(target_filename)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/github/Repository.py", line 2204, in get_contents
          headers, data = self._requester.requestJsonAndCheck(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/github/Requester.py", line 550, in requestJsonAndCheck
          return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/github/Requester.py", line 611, in __check
          raise self.createException(status, responseHeaders, data)
      github.GithubException.UnknownObjectException: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest/repos/contents#get-repository-content", "status": "404"}
    

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "/home/runner/work/git-bob-playground/git-bob-playground/git-bob/src/git_bob/_ai_github_utilities.py", line 480, in solve_github_issue
    download_to_repository(repository, branch_name, source_url, target_filename)
    File "/home/runner/work/git-bob-playground/git-bob-playground/git-bob/src/git_bob/_github_utilities.py", line 843, in download_to_repository
    repo.create_file(target_filename, commit_message, image_content, branch=branch_name)
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/github/Repository.py", line 2457, in create_file
    headers, data = self._requester.requestJsonAndCheck(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/github/Requester.py", line 550, in requestJsonAndCheck
    return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/site-packages/github/Requester.py", line 611, in __check
    raise self.createException(status, responseHeaders, data)
    github.GithubException.GithubException: 422 {"message": "Invalid request.\n\n"sha" wasn't supplied.", "documentation_url": "https://docs.github.com/rest/repos/contents#create-or-update-file-contents", "status": "422"}

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

Successfully merging this pull request may close these issues.

[BioImage Analysis]: Nuclei segmentation
1 participant