yuedajiong / super-ai-vision-stereo-world-generate-triposr

18 stars 5 forks source link

incomplete obj file #4

Open jasonfengzf opened 2 months ago

jasonfengzf commented 2 months ago

Hi! I train the model with this code:

model = TSR(img_size=image_size, depth=16, embed_dim=768, num_channels=1024, num_layers=16, cross_attention_dim=768, radius=40, valid_thresh=0.001, num_samples_per_ray=128, n_hidden_layers=9, official=True)
model.load_state_dict(torch.load('./ckpt/TripoSR/model.ckpt', map_location='cpu'))
...
...
        scheduler.step()
        torch.nn.utils.clip_grad_norm_(model.parameters(), 2.0)

        if LOSS_train <= LOSS_best:
            LOSS_best = LOSS_train
            save_model_path = os.path.join(checkpoint_path, 'model_sd_epoch_{}.ckpt'.format(epoch))
            print('save model:', save_model_path)
            torch.save(model.state_dict(), save_model_path)

however, when I do inference with the new checkpoint(same inference code as before), I found the obj file only has two lines like this: image

do you know how to fix this problem? thanks!

ps: the dataset I used is provided by you!

jasonfengzf commented 2 months ago

I found the shape of 'level' (input for torchmcubes.marching_cubes) is [16777216, 1] , however, the the shape of v_pos (output of torchmcubes.marching_cubes) is [3, 3] image image