1

So I am quite new to this I was trying to find answers on google but it is kind of not working. So I am trying to run this library ImageAI library

I am able to run it normally on the CPU at least I think it runs on CPU by just calling python test.py. Am I correct there

But since the model prediction takes a long time I would like to run it on my GPU. What I was trying to do is create a conda environment and activate it but after I do I get this error.

ModuleNotFoundError: No module named 'imageai.Classification'

Although I have imageai installed in my environment

pip freeze | findstr imageai
imageai==2.1.5

As you can see by executing this command. What am I doing wrong here?

TenebrisNocte
  • 179
  • 10
  • https://github.com/OlafenwaMoses/ImageAI/issues/55 – Robert Harvey Oct 06 '21 at 12:57
  • And there are several other articles [here](https://www.google.com/search?q=ModuleNotFoundError%3A+No+module+named+%27imageai.Classification). – Robert Harvey Oct 06 '21 at 12:58
  • @RobertHarvey yes but it isn't the same issue. One doesn't recognize the library at all mine does but not the modules – TenebrisNocte Oct 06 '21 at 13:20
  • I think you should try following the advice at those articles anyway. They explain how to use pip properly. Package managers exist because they help prevent dependency problems like yours. – Robert Harvey Oct 06 '21 at 13:21
  • @RobertHarvey will take a more closer look at the articles I already did but maybe I have missed something. But I installed every requirement for this library as far as I know – TenebrisNocte Oct 06 '21 at 13:25

1 Answers1

1

I found the solution it doesnt require the conda environment. ImageAI automatically runs on GPU if available. All you need to do is to ensure you have the GPU version of Tensorflow installed.

TenebrisNocte
  • 179
  • 10