Unable to see feature generation for one class

Hello, I was testing out a sample project of classifying digit 0 and digit 1 from mnist dataset. I could not see class 0 in my feature generation and I am struggling to find an issue. I think it may be a bug with the uploader or the way it handles files. Could you please look into my project and see if I made an error or is it a bug?

Here’s my project id: 78649
Project name: Custom

Thank you!

Hello @Nikunj,

Indeed, this is strange, I am creating a version called Edge Impulse Support so I can test it on my side without affecting your project state.

I’ll let you know.

Regards,

Louis

When I was regenerating your features on your project I cloned, I checked another page and came back to the feature generation page and I saw this error:

Also printing here to ease the search if someone else comes across this error:

Error while loading features: Failed to parse NPY header SyntaxError: Unexpected token E in JSON at position 51 ...

I am creating an internal ticket so our Core Engineering team can have a look.

Regards,

Louis

Hi Louis, thank you for looking into and forwarding it to appropriate team. I wanted to check if you have any update with this issue and if there is something I need to do with the dataset that I am uploading?

Thanks
Nikunj

Hello,

I have just sent a new message to check if they had time to have a look.
I don’t think it is a blocker for your project although I understand it is annoying :slight_smile: I can see that you managed to train your NN (with a good accuracy).
I’ll come back to you as soon I have more information.

Regards,

Louis

Hello Louis,

Thanks for looking into this again. Unfortunately, I think it is a blocker. If you notice the result graph that it generates, I can only see one sample of the class 0, which means that it is trying to classify between >5000 samples of class 1 and a single sample of class 0. Notice also the loss and accuracy are very high that I start to get from the beginning due to this extremely high imbalance in this classes.

Let me know if I have got this wrong.

Nikunj

Hello @Nikunj,

@rjames, one of our Core Engineer asked me if he can be added to your project so he can have a look soon.
I invited him this morning to your project. I will let you know when we have more info.

Regards,

Louis

Hi Louis, following up for an update on the above. Is there something I can do with the data as a ‘hack’ to get going with my project in the meantime?

Thanks
Nikunj

Hello @Nikunj,

I am not sure @rjames had time yet to have a deeper look.

On your project I cloned on my side, I tried different things:
I exported your data, deleted them all, import them again -> Same error
I changed the RGB color depth to Greyscale -> Same error
Changed the Image processing block to Raw data -> I can detect clusters

But this is incompatible with your NN architecture:

tf.keras.layers.Conv2D(
        filters=32, kernel_size=3, input_shape=(28, 28, 3), strides=2),

I changed your NN architecture to make it work:

However, this still does not explain the what the issue is…
How did you imported your dataset?

Regards,

Louis

@Nikunj,

You only see samples from the one class because the Live Classification page limits the ** Classify existing test sample** dropdown to 1000 samples and your one class contains more than 1000 samples you don’t see the other class.

You can still grab samples from (any, other) class by going to Model Testing page, select classify all. Then you’ll be able to scroll to any sample, click on the ... options menu, choose Show classification result. You’ll be taken to the Live Classification page with the sample selected and thus will be able to see the features.

From there you can grab a raw feature and test with https://github.com/edgeimpulse/example-standalone-inferencing. I’ve tested with your model and this works.