(config, manifest_root, batch_size, subset_pct=100,
                     PIXEL_MEANS=np.array([104, 117, 123]))
return dl
Builds the dataloader for the Faster-RCNN network using our aeon loader.
    Besides, the base loader, we add several operations:
    1. Cast the image data into float32 format
    2. Subtract the BGRMean from the image. We used pre-defined means from training
       the VGG network.
    3. Repack the data for Faster-RCNN model. This model has several nested branches, so
       The buffers have to repacked into nested tuples to match the branch leafs. Additionally,
       buffers for training the RCNN portion of the model are also allocated and provisioned
       to the model.

    Arguments:
        config (dict): dataloader configuration
        be (backend): compute backend

    Returns:
        dataloader object.
Builds the dataloader for the Faster-RCNN network using our aeon loader.
    Besides, the base loader, we add several operations:
    1. Cast the image data into float32 format
    2. Subtract the BGRMean from the image. We used pre-defined means from training
       the VGG network.
    3. Repack the data for Faster-RCNN model. This model has several nested branches, so
       The buffers have to repacked into nested tuples to match the branch leafs. Additionally,
       buffers for training the RCNN portion of the model are also allocated and provisioned
       to the model.
Builds the dataloader for the Faster - RCNN network using our aeon loader . Besides the base loader we add several operations : 1 . Cast the image data into float32 format 2 . Subtract the BGRMean from the image . We used pre - defined means from training the VGG network . 3 . Repack the data for Faster - RCNN model . This model has several nested branches so The buffers have to repacked into nested tuples to match the branch leafs . Additionally buffers for training the RCNN portion of the model are also allocated and provisioned to the model .
def build_dataloader(config, manifest_root, batch_size, subset_pct=100,
                     PIXEL_MEANS=np.array([104, 117, 123])):
    """
    Builds the dataloader for the Faster-RCNN network using our aeon loader.
    Besides, the base loader, we add several operations:
    1. Cast the image data into float32 format
    2. Subtract the BGRMean from the image. We used pre-defined means from training
       the VGG network.
    3. Repack the data for Faster-RCNN model. This model has several nested branches, so
       The buffers have to repacked into nested tuples to match the branch leafs. Additionally,
       buffers for training the RCNN portion of the model are also allocated and provisioned
       to the model.

    Arguments:
        config (dict): dataloader configuration
        be (backend): compute backend

    Returns:
        dataloader object.
    """
    # assert config['minibatch_size'] == be.bsz,
    # 'Dataloader config\'s minibatch size not matching backend bsz'
    config["manifest_root"] = manifest_root
    config["batch_size"] = batch_size
    config["subset_fraction"] = float(subset_pct/100.0)

    dl = DataLoaderAdapter(DataLoader(config))
    dl = TypeCast(dl, index=5, dtype=np.float32)  # cast image to float

    dl = BGRMeanSubtract(dl, index=5, pixel_mean=PIXEL_MEANS)  # subtract means
    dl = ObjectLocalization(dl)
    dl.set_classes(config['etl'][0]['class_names'])
    dl.shape = dl.shapes()[5]
    return dl
def build_dataloader ( config , manifest_root , batch_size , subset_pct = 100 , PIXEL_MEANS = np . array ( [ 104 , 117 , 123 ] ) ) : # assert config['minibatch_size'] == be.bsz, # 'Dataloader config\'s minibatch size not matching backend bsz' config [ "manifest_root" ] = manifest_root config [ "batch_size" ] = batch_size config [ "subset_fraction" ] = float ( subset_pct / 100.0 ) dl = DataLoaderAdapter ( DataLoader ( config ) ) dl = TypeCast ( dl , index = 5 , dtype = np . float32 ) # cast image to float dl = BGRMeanSubtract ( dl , index = 5 , pixel_mean = PIXEL_MEANS ) # subtract means dl = ObjectLocalization ( dl ) dl . set_classes ( config [ 'etl' ] [ 0 ] [ 'class_names' ] ) dl . shape = dl . shapes ( ) [ 5 ] return dl