learn2phoenix / CSD

MIT License
105 stars 7 forks source link

Column or variable 'fps' does not exist #3

Closed TATEXH closed 6 months ago

TATEXH commented 6 months ago

Hi

I ran main_sim.py and got the following error. There does not seem to be a column called 'fps' in the wikiart.csv on github. What should I do?

python main_sim.py --dataset wikiart -a vit_large --pt_style csd --feattype normal --world-size 1 \
-b 128 -j 8 --embed_dir ./embeddings --data-dir ./wikiart_data \
--model_path ./pretrainedmodels/checkpoint.pthroot@host_csd:/data_root/CSD# ./run.sh
=> loaded checkpoint with msg <All keys matched successfully>
Traceback (most recent call last):
  File "main_sim.py", line 356, in <module>
    main()
  File "main_sim.py", line 131, in main
    main_worker(args.gpu, ngpus_per_node, args)
  File "main_sim.py", line 273, in main_worker
    dataset_query = WikiArtD(args.data_dir, args.qsplit, ret_transform)
  File "/data_root/CSD/data/wikiart.py", line 45, in __init__
    self.pathlist = temprepo[temprepo['split'] == split]['fps'].tolist()
  File "/root/.pyenv/versions/anaconda3-2021.05/lib/python3.8/site-packages/vaex/dataframe.py", line 5395, in __getitem__
    self.validate_expression(item)
  File "/root/.pyenv/versions/anaconda3-2021.05/lib/python3.8/site-packages/vaex/dataframe.py", line 3446, in validate_expression
    raise NameError(str(e)) from None
NameError: Column or variable 'fps' does not exist.
learn2phoenix commented 6 months ago

Hey, sorry for this oversight. The README has been updated regarding this. Basically, you'll need to introduce a new column path to this csv file, and the column should contain the absolute paths to the images. The code has been updated to use path instead of fps

TATEXH commented 6 months ago

Thanks!