crockwell / Cap3D

[NeurIPS 2023] Scalable 3D Captioning with Pretrained Models
https://huggingface.co/datasets/tiange/Cap3D
218 stars 13 forks source link

Mapping UID to original Objaverse objects #15

Closed 0010SS closed 11 months ago

0010SS commented 11 months ago

Hi! Thanks for your wonderful work. I'm wondering whether there are ways in which we can map the UID of an object back to its original record in the Objaverse annotations so that we can directly download the mesh object from Objaverse. Thanks!

crockwell commented 11 months ago

Hello -- if I recall, our UID is the same as Objaverse's UID category. So you should be able to access the Objaverse objects using our UID and their API

tiangeluo commented 11 months ago

Hi @0010SS , thanks for your interests~

As Chris said, all of our uid for Captions and PointClouds (can be downloaded at https://huggingface.co/datasets/tiange/Cap3D) are named with the uid provided by Objaverse.

I provide one example here for your reference:

# load our captions
import pandas as pd
captions = pd.read_csv('Cap3D_automated_Objaverse_no3Dword.csv', header=None)

## captions:
##                                        0                                                  1
## 0       ed51a51909ee46c780db3a85e821feb2                           A green and white rifle.
## 1       9110b606f6c547b2980fcb3c8c4b6a1c  a small building with a roof, accompanied by b...
## 2       80d9caaa1fa04502af666135196456e1  a pair of purple and black swords with white h...
## 3       28d43a218cd8466a8c1f82b29b71e314  a small house, island, road with trash, trash ...
## 4       75582285fab442a2ba31733f9c8fae66                              a small, grassy hill.
## ...                                  ...                                                ...
## 661572  ccee95eac2fb48ec92d357e3d853f2bd  a tall, white tower featuring a door, stairs, ...
## 661573  f02f574e85e94b879c1b54f4d3aa4b35           A yellow disc with a hole in the middle.
## 661574  f1d3d36114d34d29a18a8ed1516bf355        pink and white ball with a face and spikes.
## 661575  32d1927d6c0e4d9b9c445fc5988ec6c6  a white and pink bedroom and bathroom, featuri...
## 661576  2fa12ba0af5442c9af8f9bead1a7d020                  Monstera plant with green leaves.

# download via Objaverse API
import objaverse
import multiprocessing
processes = multiprocessing.cpu_count()

uids_download = captions[0][:100].values
objects = objaverse.load_objects(
     uids=uids_download,
     download_processes=processes
 )

Please let us know if you need further assistance here!

0010SS commented 11 months ago

Thank you for your detailed reply!