-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trained model accuracy! #102
Comments
@mmazloom, I'll work on it (reproduce and fix it if required) along the next week. |
Is your source code available for me to look at? |
Sorry for the delay. procedure TForm1.Button1Click(Sender: TObject); FNewSizeX, FNewSizeY: integer; begin ImgVolumes := TNNetVolumeList.Create(); NumClasses := 39; NN := TNNet.Create(); NN.LoadFromFile('d:\SimplePlantLeafDisease.nn'); NN.EnableDropouts(false); pOutput := TNNetVolume.Create(NumClasses, 1, 1); Volume := TNNetVolume.Create(); OpenDialog1.Execute(); Image := TJpegImage.Create; bmp := TBitmap.Create; LoadBitmapIntoVolume(bmp, Volume); FNewSizeX := 128; NN.Compute(Volume); Memo1.Lines.Add(pOutput.GetClass.ToString()); end; Extra info: |
@mmazloom , thank you for sharing the code! I miss something like this before calling If you are using RGB images, FColorEncoding will be 0 (or What is the result from: |
I used the Image (1).jpg from folder Plant_leave_diseases_dataset_with_augmentation\Apple___Black_rot as input image, this the volume debug output: and this the RAW array output (class 0 is winner instead of class 1): |
@mmazloom , thank you sharing. I'll only be able to look in more details along the next week. Anyway, I'm wondering if is there any problem with the labeling... (such as, is class 1 really the class 1)? Also, are all images giving the same output? Anyway, thank you for the feedback. I'll look at it. |
No, the output for different images is different. But I expect to return the 0 for the first folder, 1 for the scond folde and ... |
Quick update: I'm about to start working on this bug report. |
@mmazloom, You can uncomment the fitting method if you need to train again. Give it a go at your end to this code please.
|
@mmazloom , |
Hello every body,
I hav trained a model using the SimplePlantLeafDiseaseLoading sample in Lazarus. It shows that the trained model has abou 98% accuracy in the train phase.
But when I use the compute method and pass an image to model, almost all predictions are wrong!
What is the problem I have?
Regrads
The text was updated successfully, but these errors were encountered: