mshukor / TFood

[CVPRW22] Official Implementation of T-Food: "Transformer Decoders with MultiModal Regularization for Cross-Modal Food Retrieval". Accepted at CVPR22 's MULA Workshop.
Other
29 stars 7 forks source link

question #4

Open dong-0412 opened 2 years ago

dong-0412 commented 2 years ago

dataset = factory(split) if Options()['misc'].get("device_id", False): device_id = Options()['misc.device_id'] else: device_id = 0 Logger()('Load model...') model = model_factory() model_state = torch.load(path_model_ckpt) model.load_state_dict(model_state) model.eval()

the code above from the ingrs_to_images.py ,I confused with it , that the dataset and model loadeling process maybe roung , could you give me some guide about it, or about the retrival process

mshukor commented 2 years ago

Some files (including this ingrs_to_images.py) are not used in TFood, they are from the original Adamine repo. The functions that compute the metrics for retrieval (and hence used during test) is in models.metrics.trijoint..py. You can follow the instructions in the README to do the test.

dong-0412 commented 2 years ago

thank you for reply , I'm a beginner in NL , and I'd like to know have you finished the retieval process for TFood , just like the ingrs_to_images.py in Adamine repo which can retrieval some images by a ingredient input array.