hollance / coreml-survival-guide

Source code for the book Core ML Survival Guide
MIT License
252 stars 36 forks source link

AttributeError: 'ArrayFeatureType' object has no attribute 'shapeRange' #7

Closed athlaing closed 5 years ago

athlaing commented 5 years ago

I tried running your script for ssdlite_mobilenet_v2.. downloaded from tensorflow/models/research/object_detection/ repo.The script runs until after the decoder stage and stops while doing the NMS with the error:

ma_type.shapeRange.sizeRanges.add() AttributeError: 'ArrayFeatureType' object has no attribute 'shapeRange'

Help would be very much appreciated! I am very new to CoreML.

hollance commented 5 years ago

This probably happens because you’re using different versions of the packages and/or model than I did. This stuff changes all the time, so sometimes things break. I don’t have time right now to look at it, perhaps I can have a look over the weekend.

athlaing commented 5 years ago

I tried switching tfcoreml versions and I still received the same error. I would appreciate if you could take a look when you have the time. Thank you.

athlaing commented 5 years ago

I found the problem; it was coremltools not being 2.0. I created a conda env for py2 and I was able to install it through pip. Thank you.