Skip to content
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

Where is the CNN model for classification? #24

Open
PurpleMStone opened this issue May 31, 2023 · 5 comments
Open

Where is the CNN model for classification? #24

PurpleMStone opened this issue May 31, 2023 · 5 comments

Comments

@PurpleMStone
Copy link

image
@abhilash-wfx
Copy link

You can find the model at this link: https://drive.google.com/drive/folders/1MK0Om7Lx0wRXGDfNcyj21B0FL1T461v5?usp=sharing
It is mentioned in the Readme in the Installation section.

@dm-mx
Copy link

dm-mx commented Sep 18, 2023

I am also running into this problem, for batches. It's referring to multiple models in the script, and I see no mention of where to find these models in the README?

@theonewolf
Copy link

Same issue for me as well.

@Hritik-Raj
Copy link

I am having the same issue, especially for element detection. When I use the model from the Google drive link, it does not seem to match the one needed for element detection, since I get an error saying that Kernel shape does not match length of input. - For reference, these are the three models listed for element detection, but commented out in the CNN.py file.
#self.model_path = 'E:/Mulong/Model/rico_compos/resnet-ele14-19.h5'
# self.model_path = 'E:/Mulong/Model/rico_compos/resnet-ele14-28.h5'
# self.model_path = 'E:/Mulong/Model/rico_compos/resnet-ele14-45.h5'

@bonifacsolyom
Copy link

bonifacsolyom commented Jul 24, 2024

I figured it out - this repository seems to be in a half-finished state, with a lot of leftover code that isn't actually used. Here's what you need to do:

  1. Download the pretrained model from the author's Google Drive (link can be found in the README and also above).
  2. In config/CONFIG.py, change the self.CNN_PATH to the path of the downloaded model (watch out as there are multiple config files; make sure you're editing the correct one).
  3. In run_single.py, change the is_clf variable to True (I didn't try it with run_testing.py or run_batch.py but you will probably need to make this edit there as well if you wish to use them)
  4. In ip_region_proposal.py, uncomment the code under step 6 (lines 83-86). Leave step 5 as it is.

Ignore any other references to other models or files on the author's system, as they do not actually seem to be used. One more thing to mention is that, by default, the program is only configured to show 4 categories of classifications. It either doesn't show the rest or crashes (I don't remember) if an element is classified as something other than those 4 categories. You might need to edit the code to handle this.

That said, the classifier didn't work well at all for me (it didn't classify a single element successfully). Your mileage may vary, but maybe there's a reason it's disabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants