Skip to content

Instantly share code, notes, and snippets.

@Mole1424
Mole1424 / ROI_pooling.py
Last active February 11, 2025 20:13 — forked from Jsevillamol/ROI_pooling.py
ROI Pooling Layer
import tensorflow as tf
from tensorflow.keras.layers import Layer
class ROIPoolingLayer(Layer):
""" Implements Region Of Interest Max Pooling
for channel-first images and relative bounding box coordinates
# Constructor parameters
pooled_height, pooled_width (int) --
specify height and width of layer outputs