openmedlab/MedLSAM

I don't find requirements.txt in the folder, where do I run pip install -e?

Opened this issue · 4 comments

image
I can't find requirements.txt in the folder mentioned above, and I can't run pip install -e. Could you tell me where to run pip install -e?

Plus:
image
Is the chekpoint folder supposed to go under the home directory?

LWHYC commented

image I can't find requirements.txt in the folder mentioned above, and I can't run pip install -e. Could you tell me where to run pip install -e?

I apologize for any confusion, but in this case, we don't have a requirements.txt file. Instead, we're using a setup.py file. This file serves a similar purpose to requirements.txt, specifying what packages are necessary for the project to run.

The command pip install -e . means "install this Python package in editable mode". The . represents the current directory (which should be the root directory of the MedLSAM repository, where setup.py is located). Once you run this command, it should install the package along with its dependencies specified in the setup.py file.

Here are the steps you need to follow:

  1. Navigate to the MedLSAM folder if you haven't already, using cd MedLSAM
  2. In the MedLSAM directory, run pip install -e .

Please ensure you are in the correct directory when running the pip install -e . command.

LWHYC commented

Plus: image Is the chekpoint folder supposed to go under the home directory?

The checkpoint/ folder is not under the home directory, but within the MedLSAM project directory itself. When we refer to checkpoint/medlam.pth, checkpoint/sam_vit_b_01ec64.pth and checkpoint/medsam_20230423_vit_b_0.0.1.pth, we are referring to these paths relative to the root directory of the MedLSAM project.

So after you've cloned the MedLSAM project from GitHub, there should be a checkpoint/ directory in the root of the project. If not, you could create it by running mkdir checkpoint in the root of the project. This is where you'll place the downloaded checkpoint files.

Please make sure you place the checkpoint files in this checkpoint/ folder inside the MedLSAM project directory, not in a checkpoint/ folder under your home directory.

Let me know if you have any other questions!

Thank you for your reply, which was very understandable and complete.