Instance segmentation program on big images

Hello,
I am looking for an instance segmentation program which takes 3000x2500 pixels images at the input of the neural network without explode the GPU RAM (I have 24GB of RAM in my GPU).
Thank you
Best regards

Hi @Sylvain_Ard ,

Choosing an instance segmentation program for your 3000x2500 pixel images with 24GB of GPU RAM requires to avoid memory issues.

1. Model Selection:

  • Lightweight Models: Consider efficient models like EfficientDet-Lite, MobileNetV3-Large, or U-Net with smaller backbones like ResNet-18. These models trade off some accuracy for reduced memory footprint.
  • Transfer Learning: Fine-tune a pre-trained model on your specific dataset. This can leverage existing knowledge while adapting to your specific objects and requirements.

2. Data Preprocessing:

  • Resize Images: Downscale your input images to a smaller resolution before feeding them to the model. This significantly reduces memory consumption while maintaining reasonable accuracy. Aim for a resolution that balances detail with memory efficiency, like 1024x768 or 512x384.
  • Data Augmentation: Utilize data augmentation techniques like random cropping, flipping, and color jitter. This helps the model generalize better without requiring a massive dataset, reducing the need for large batches in memory.

3. Training Strategies:

  • Gradient Accumulation: Divide your training batch size into smaller chunks and accumulate gradients across them before updating the model weights. This allows training with larger effective batch sizes without exceeding GPU memory.
  • Mixed Precision Training: Use mixed precision training (e.g., FP16) to store and manipulate data in lower-precision formats, leading to significant memory savings.

4. Implementation Frameworks:

  • TensorFlow Lite: Explore frameworks like TensorFlow Lite that offer optimized model conversion and inference pipelines for mobile and embedded devices. This can further reduce memory usage during inference.

Thanks.