Skip to content

augment modes supported by different operations #40

@johnnychen94

Description

@johnnychen94

This issue is for reference usage

Operation

Name eager lazy affinemap permute view stepview affine affineview
Augmentor.ImageOperation
AggregateThenMapFun
CombineChannels
ConvertEltype
MapFun
PermuteDims
Reshape
SplitChannels

ImageOperation

Name eager lazy affinemap permute view stepview affine affineview
Augmentor.AffineOperation
Augmentor.CacheImageInto
CacheImage
Crop
CropNative
CropRatio
CropSize
Either
ElasticDistortion
RCropRatio
Resize
Zoom

AffineOperation

Name eager lazy affinemap permute view stepview affine affineview
FlipX
FlipY
NoOp
Rotate
Rotate180
Rotate270
Rotate90
Scale
ShearX
ShearY
script
using Augmentor

check_list = ["lazy",
              "uses_affinemap",
              "eager",
              "permute",
              "view",
              "stepview",
              "affine",
              "affineview",
              ]

op_list = [AggregateThenMapFun,
           CombineChannels,
           ConvertEltype,
           MapFun,
           PermuteDims,
           Reshape,
           SplitChannels,
           # ImageOperation
           Augmentor.ImageOperation,
           Augmentor.CacheImageInto,
           CacheImage,
           Crop,
           CropNative,
           CropRatio,
           CropSize,
           Either,
           ElasticDistortion,
           RCropRatio,
           Resize,
           Zoom,
           # AffineOperation
           Augmentor.AffineOperation,
           FlipX,
           FlipY,
           NoOp,
           Rotate,
           Rotate180,
           Rotate270,
           Rotate90,
           Scale,
           ShearX,
           ShearY,
]

bool2emoji(x) = if x "" else "" end


open("out.md", "w") do io
    # header
    print(io, "| Name")
    for fn_name in check_list
        print(io, " | ", fn_name)
    end
    println(io, " |")

    print(io, "| ---")
    for _ in check_list
        print(io, " | --- ")
    end
    println(io, " |")

    for op in op_list
        print(io, "| ", op)
        for fn_name in check_list
            if isdefined(Augmentor, Symbol("supports_"*fn_name))
                fn_name = Symbol("supports_"*fn_name)
            else
                fn_name = Symbol(fn_name)
            end
            @show fn_name

            rst = @eval ($fn_name)($op)
            rst = bool2emoji(rst)
            print(io, " | ", rst)
        end
        println(io, " |")
    end
end

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions