maxvit
maxvit copied to clipboard
Add preprocessing method that takes the raw image tensor
I have tried with preprocessing method:
img_ = eval_driver.get_preprocess_fn()(tf.io.read_file(path))
But get constantly errors like:
{function_node __wrapped__ExtractJpegShape_device_/job:localhost/replica:0/task:0/device:CPU:0}} Invalid JPEG data, size 442707 [Op:ExtractJpegShape]
Not a JPEG file: starts with 0x89 0x50
{{function_node __wrapped__ExtractJpegShape_device_/job:localhost/replica:0/task:0/device:CPU:0}} Invalid JPEG data, size 328248 [Op:ExtractJpegShape]
{{function_node __wrapped__ExtractJpegShape_device_/job:localhost/replica:0/task:0/device:CPU:0}} Invalid JPEG data, size 156137 [Op:ExtractJpegShape]
Not a JPEG file: starts with 0x89 0x50
Not a JPEG file: starts with 0x89 0x50
{{function_node __wrapped__ExtractJpegShape_device_/job:localhost/replica:0/task:0/device:CPU:0}} Invalid JPEG data, size 258371 [Op:ExtractJpegShape