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

anomalib installation #2535

Open
LorenzoF6 opened this issue Jan 22, 2025 · 8 comments
Open

anomalib installation #2535

LorenzoF6 opened this issue Jan 22, 2025 · 8 comments

Comments

@LorenzoF6
Copy link

Hi,
i want to install anomalib on colab,
if i install by pip install anomalib[full] it is installed in the path ../python3.10/dist-packages/ but when every time i restart the session i must reinstall the library, it is correct?
Is there something i can do to install permantely the library, such as an istallation in a drive directory that i mount on my colab, and not have path and dependecies problem ?
Thanks

@alexriedel1
Copy link
Contributor

You don't have persistent storage in Colab. So you must install anomalibs dependencies each time you restart a session.
Otherwise you will have to look for a cloud GPU computing provider that offers persistent storage.

@LorenzoF6
Copy link
Author

ok thanks and for the position of custom dataset ? i see the anomalib have a folder called datasets where to put the custom and beanchmark datasets but if each time anomalib must be reinstallled what happen ?
Or it is possible to put my custom datasets in some drive folder and when i call tje folder datamodule put in the parameter root the absolute path to dataset (such as \content\drive\My Drive\Datasets)?
thanks

@alexriedel1
Copy link
Contributor

@samet-akcay
Copy link
Contributor

i see the anomalib have a folder called datasets where to put the custom and beanchmark datasets

this is not mandatory, just the default directory. You could customise it from the data classes such as MVTec or Visa

@LorenzoF6
Copy link
Author

i see the anomalib have a folder called datasets where to put the custom and beanchmark datasets

this is not mandatory, just the default directory. You could customise it from the data classes such as MVTec or Visa

Sorry but i might think that i don't understand; so if i say when i write .. root = "\content\drive\My Drive\Datasets\CustomDataset" is correct to give the correct location of my data when i use folder ?

@alexriedel1
Copy link
Contributor

alexriedel1 commented Jan 23, 2025

When you use a folder datamodule, you initialize it like this:


from anomalib.data import Folder
datamodule = Folder(
     name="custom_folder",
     root="./datasets/custom",
     normal_dir="good",
     abnormal_dir="defect"
)

You will have your good images in ./datasets/custom/good and your abnormal images in ./datasets/custom/defect
If you mount your Google Drive to Colab, you use path of your data in your google drive.

@LorenzoF6
Copy link
Author

thanks and if i put the good folder in a new folder called train (so the path is /custom_dataset/train/good in normal_dir i put "train/good" it is correct?

@alexriedel1
Copy link
Contributor

thanks and if i put the good folder in a new folder called train (so the path is /custom_dataset/train/good in normal_dir i put "train/good" it is correct?

correct

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

3 participants