pip installing point-e / importing point-e
Not too sure how to pip install point-e. I saw pip install -e, but believe that is an editable install for the setup.py
Try: !pip install git+https://github.com/openai/point-e.git works for my colab
Hey thanks managed to install that but I now receive the following error: ModuleNotFoundError: No module named 'point_e'.
I tried import point_e and import point-e
Hello @brinpat, your problem can be solved by changing the direction after installing the repository.
As @pratos recommended you:
1st: !pip install git+https://github.com/openai/point-e.git
Then:
2nd: %cd point-e
3rd: !pip install .
Hope this hill help you :)
Perhaps it should be blatantly obvious, but it is not clear to me what to do after pip install . successfully completed?
Perhaps it should be blatantly obvious, but it is not clear to me what to do after pip install . successfully completed?
Same issue, what do i do after doing pip install . , do run the application on cmd or is there a way to download it?. Sorry, I am a beginner in this issue.
Hi guys, sorry for the delayed answer.
After doing that I did. You only need to run the code as the author @unixpickle wrote it, you can follow this example: https://github.com/openai/point-e/blob/main/point_e/examples/image2pointcloud.ipynb
In order to make it easier to you, here you have the complete code. Only paste and copy! :)
1. Package instalation
!git clone https://github.com/openai/point-e.git
%cd point-e
!pip install .
2. Package import
from PIL import Image
import torch
from tqdm.auto import tqdm
from point_e.diffusion.configs import DIFFUSION_CONFIGS, diffusion_from_config
from point_e.diffusion.sampler import PointCloudSampler
from point_e.models.download import load_checkpoint
from point_e.models.configs import MODEL_CONFIGS, model_from_config
from point_e.util.plotting import plot_point_cloud
3. Model prep
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
print('creating base model...')
base_name = 'base1B' # Qualitat resultat = base40M < base300M < base1B (de pitjor a millor)
base_model = model_from_config(MODEL_CONFIGS[base_name], device)
base_model.eval()
base_diffusion = diffusion_from_config(DIFFUSION_CONFIGS[base_name])
print('creating upsample model...')
upsampler_model = model_from_config(MODEL_CONFIGS['upsample'], device)
upsampler_model.eval()
upsampler_diffusion = diffusion_from_config(DIFFUSION_CONFIGS['upsample'])
print('downloading base checkpoint...')
base_model.load_state_dict(load_checkpoint(base_name, device))
print('downloading upsampler checkpoint...')
upsampler_model.load_state_dict(load_checkpoint('upsample', device))
4. Sampler prep
sampler = PointCloudSampler(
device=device,
models=[base_model, upsampler_model],
diffusions=[base_diffusion, upsampler_diffusion],
num_points=[1024, 4096 - 1024],
aux_channels=['R', 'G', 'B'],
guidance_scale=[3.0, 3.0],
)
4. Execution of interfaces
img = Image.open('point_e/examples/example_data/cube_stack.jpg')
samples = None
for x in tqdm(sampler.sample_batch_progressive(batch_size=1, model_kwargs=dict(images=[img]))):
samples = x
5. Display of 3D point cloud
pc = sampler.output_to_point_clouds(samples)[0]
fig = plot_point_cloud(pc, grid_size=3, fixed_bounds=((-0.75, -0.75, -0.75),(0.75, 0.75, 0.75)))
I am having trouble with this download. I am on the last portion and the input on #3 Model Prep
This :
print('downloading base checkpoint...') base_model.load_state_dict(load_checkpoint(base_name, device))
Is not working for me as it says
NameError Traceback (most recent call last)
NameError: name 'load_checkpoint' is not defined
HOW DO I GET PAST THIS - its 2023 February can we still access this text to 2d model
@Chantelley, looks like that function was imported in the second step detailed by @pedromartip, namely:
from point_e.models.download import load_checkpoint
You'll need to import all functions you plan on using before they'll be accessible.
Just made my first 3D generated model of a red bike! Thanks ;)