# Model ResNet

This function block allows users to utilize various ResNet models for image classification tasks. It provides different options for model selection and input configurations.

## 📥 Inputs <a href="#inputs" id="inputs"></a>

`Choose Folder 2D` Connect to an input block that provides image data ready for processing through the ResNet model.

## 📤 Outputs <a href="#outputs" id="outputs"></a>

The output of this function block is the corresponding model ready to be evaluated on input images.

## 🕹️ Controls <a href="#controls" id="controls"></a>

`Model Type` A dropdown menu that allows users to select the ResNet variant to use (e.g., ResNet50, ResNet101, etc.).

`Input Size` A text input to specify the desired input image size for the model. It should be an integer value that meets the minimum requirement (32 pixels).

`Pooling` A dropdown menu to select the pooling type to be used in the model (Maximum, Average, or None).

## 🎨 Features <a href="#features" id="features"></a>

`Multiple Model Options` Offers a variety of ResNet architectures to choose from, catering to different needs based on performance and complexity.

`Dynamic Input Size` User-defined input size allows flexibility based on the input images being used.

`Pooling Options` Users can decide on the pooling layer to be used in the architecture, which can affect the model's classification performance.

## 📝 Usage Instructions <a href="#usage" id="usage"></a>

1. **Connect Input**: Link this block to an appropriate input block that provides images for processing, such as a folder of images.
2. **Select Model Type**: Choose the desired ResNet model variant from the `Model Type` dropdown.
3. **Specify Input Size**: Enter an integer value in the `Input Size` field (minimum size is 32).
4. **Select Pooling Method**: Choose a pooling method from the `Pooling` dropdown to define how the pooling layers will be handled.
5. **Evaluate Model**: Run the block, and it will output the ResNet model configured with specified parameters for classification tasks.

## 📊 Evaluation <a href="#evaluation" id="evaluation"></a>

Upon evaluating the block, it will return a configured ResNet model prepared for image classification based on the connected image input.

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

<details>

<summary>Handling Different Image Sizes</summary>

Ensure your input images match the specified input size. Resizing images beforehand may improve model performance and prevent errors.

</details>

<details>

<summary>Choosing the Right Pooling Method</summary>

Experiment with different pooling options based on your dataset. For high-resolution images, using `Average` pooling may help retain relevant features.

</details>

<details>

<summary>Verifying Input Colors</summary>

The model works with RGB images only. Ensure that your input data is formatted correctly. You could use an `Image Color Match` function block to confirm image channels before processing.

</details>

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

<details>

<summary>Invalid Input Size Error</summary>

If you encounter an input size error, ensure the input provided is an integer value greater than or equal to 32. If the error persists, verify your entered input.

</details>

<details>

<summary>RGB Image Requirement</summary>

If the model fails, ensure that the input images are in the correct format (RGB). Any grayscale or different format images will lead to an error.

</details>
