I'm having the same issue discussed here but I'm unable to find a workaround. I've attached the full error, but I think it boils down to this line of code:
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\fastai\vision\image.py", line 560, in _affine_grid N, C, H, W = size ^^^^^^^^^^ValueError: not enough values to unpack (expected 4, got 3)Python Raster Function's .vectorize() method returned nothing.
I am running ArcGIS Pro 3.5.4 and have a model trained with Pascal VOC metadata format. This error occurs regardless of which model type I run (e.g. Faster R-CNN, RetinaNet, MMDetection, etc.). Using the same training data and a model with RCNN Masks metadata format, I have no issues detecting objects using Mask R-CNN. I'd just like to run some of the other model types for comparison.
I've tried updated some of the relevant packages in Package Manager, since several of them are not using the latest, but it seems there are dependencies preventing me from getting newer versions.
Is anyone able to offer advice here? Thanks in advance!
Here's some information I learned from reviewing other cases:
That message is coming from the Python Raster Function / deep learning model code (fastai/PyTorch), and it indicates your model (or the raster function calling it) passed an input with the wrong shape into an affine/warping step:
ValueError: not enough values to unpack (expected 4, got 3) at fastai.vision.image._affine_grid means the code expected a 4D tensor size (N, C, H, W) (batch, channels, height, width) but received only 3 values (typically (C, H, W) or (H, W, C)), so it can’t proceed.