> For the complete documentation index, see [llms.txt](https://gut-analysis-toolbox.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gut-analysis-toolbox.gitbook.io/docs/contributing-to-gat.md).

# Contributing to GAT

Any contributions are welcome! This can be feedback about the software, suggestions for new analysis workflows, or even contributions to the code. Importantly, you **do not** need to be a programmer to contribute to GAT, as the most valuable contributions from the end users who usually tend to be non-coders.

One of the main contributions we are after are manually annotated images for generating more robust models that can segment enteric neurons, neuronal subtypes, glial cells or any other cell type within the gut wall.

***

### Improving the segmentation models

The deep learning (DL) models on GAT have been trained on a wide variety of images so that it can work on commonly used markers (Hu, nNOS, Calbindin etc..) and modalities (widefield & confocal projections). However, these models are only as good as the images it has been trained on. It is **likely GAT may not work well on some of your images**, which means these would be perfect images for **training and improving** the GAT models.

The contributions can be for:

* neuronal soma - "Hu" labelling
* neuronal subtypes such as nNOS, Calbindin, Calretinin etc.. from any species, or
* ganglia outlines using different combinations of a neuronal/glial marker and Hu.

There are two ways you can contribute training data:

* Create training data as you analyze
* Create training data using specialised scripts

***

#### Create training data as you analyze

In the latest version of GAT, you should see the following section:

<div><img src="https://github.com/pr4deepr/GutAnalysisToolbox/blob/main/wiki_images/26_contribute_GAT.png" alt=""> <figure><img src="https://github.com/pr4deepr/GutAnalysisToolbox/raw/main/wiki_images/26_contribute_GAT.png" alt=""><figcaption></figcaption></figure></div>

You can perform analysis as you normally would and manually correct your segmentations using the ROI tools and ROI Manager. Watch this [video on how to do so](https://youtu.be/GmE_lz-m0Rg?list=PLmBt1Dumq60p4mIFT4j7TP_PVRjbO55Oi\&t=306). If you tick the box and specify a folder location, the manual corrections will be saved in folders.

<div align="left"><img src="https://github.com/pr4deepr/GutAnalysisToolbox/blob/main/wiki_images/26_contribute_GAT_folders.png" alt=""> <figure><img src="https://github.com/pr4deepr/GutAnalysisToolbox/raw/main/wiki_images/26_contribute_GAT_folders.png" alt=""><figcaption></figcaption></figure></div>

If you have only performed analysis for the neurons, you will only have the `Cells` folder. If you are segmenting the ganglia as well, you will also get a folder named `Ganglia`.

Within each folder, you will have 2 folders: images and masks:

<div align="left"><img src="https://github.com/pr4deepr/GutAnalysisToolbox/blob/main/wiki_images/26_contribute_GAT_folders2.png" alt=""> <figure><img src="https://github.com/pr4deepr/GutAnalysisToolbox/raw/main/wiki_images/26_contribute_GAT_folders2.png" alt=""><figcaption></figcaption></figure></div>

The images folder contains the original image for the marker/s that were being analysed, and the masks folder will contain the corresponding image where each cell has an individual colour (label image).

<div><img src="https://github.com/pr4deepr/GutAnalysisToolbox/blob/main/wiki_images/27_contribute_GAT_folders3_img_mask.png" alt=""> <figure><img src="https://github.com/pr4deepr/GutAnalysisToolbox/raw/main/wiki_images/27_contribute_GAT_folders3_img_mask.png" alt=""><figcaption></figcaption></figure></div>

This will be the same for the `Ganglia` folder, but the ganglia mask will be a binary image (black and white).

These folders with `images` and `masks` are whats needed for training. We will provide an location online to upload the images, but if you already have some, please post under the `discussions` or `issues` tab. You could also contact me at `pradeep.rajasekhar@gmail.com`.

It is best to get atleast 5 - 10 images of varying image and labelling qualities that are representative of the images that you encounter in your lab.

#### Create training data using specialised scripts

Will be updated..

***

**Whats in it for you?**:

* The new model will work on your images and reduce the analysis time for images acquired at your lab. You can focus more time on writing/experiments or fun things instead of manually counting cells!
* Your contributions can not only be used for GAT, but for other software developers who want to develop better analytical tools for enabling ENS research.
* Improve the generalisability of the model and contribute to improving ENS research.
* You will be acknowledged for your contributions.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gut-analysis-toolbox.gitbook.io/docs/contributing-to-gat.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
