cogsys-tuebingen / deephs_fruit

Measuring the ripeness of fruit with Hyperspectral Imaging and Deep Learning
40 stars 11 forks source link

cannot training with papaya databases #8

Closed YeisonJimenez closed 11 months ago

YeisonJimenez commented 11 months ago

Hello... Is the system not adapted to train with the papaya database?

leonvarga commented 11 months ago

Training on papaya works.

Please provide an error message, otherwise it is hard to help. Are you able to train a model on the avocado data?

Best regards, Leon Varga

YeisonJimenez commented 11 months ago

Hello... Yes, I have already trained the models using the avocado, kiwi and kaki data.

The error message that appears when using the papaya data is as follows:

File "/home/yjimenez/PycharmProjects/deephs_fruit-master/classification/train.py", line 423, in main(hparams) File "/home/yjimenez/PycharmProjects/deephs_fruit-master/classification/train.py", line 399, in main trainer.fit(model) File "/home/yjimenez/Imaging_Processing/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 696, in fit self._call_and_handle_interrupt( File "/home/yjimenez/Imaging_Processing/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 648, in _call_and_handle_interrupt return self.strategy.launcher.launch(trainer_fn, *args, trainer=self, kwargs) File "/home/yjimenez/Imaging_Processing/lib/python3.10/site-packages/pytorch_lightning/strategies/launchers/subprocess_script.py", line 93, in launch return function(*args, *kwargs) File "/home/yjimenez/Imaging_Processing/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 735, in _fit_impl results = self._run(model, ckpt_path=self.ckpt_path) File "/home/yjimenez/Imaging_Processing/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 1105, in _run self._call_setup_hook() # allow user to setup lightning_module in accelerator environment File "/home/yjimenez/Imaging_Processing/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 1449, in _call_setup_hook self._call_lightning_module_hook("setup", stage=fn) File "/home/yjimenez/Imaging_Processing/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 1550, in _call_lightning_module_hook output = fn(args, kwargs) File "/home/yjimenez/PycharmProjects/deephs_fruit-master/classification/train.py", line 60, in setup get_records(self.hparams['fruit'], File "/home/yjimenez/PycharmProjects/deephs_fruit-master/core/datasets/hyperspectral_dataset.py", line 222, in get_records assert len(records) > 0 AssertionError wandb: Waiting for W&B process to finish... (failed 1). wandb:
wandb: You can sync this run to the cloud by running: wandb: wandb sync /tmp/wandb/offline-run-20230918_213420-2u51jakx wandb: Find logs at: /tmp/wandb/offline-run-20230918_213420-2u51jakx/log

leonvarga commented 11 months ago

Line File "/home/yjimenez/PycharmProjects/deephs_fruit-master/core/datasets/hyperspectral_dataset.py", line 222, in get_records assert len(records) > 0 indicates that it cannot find the hyperspectral recordings.

Can you please validate whether the data_path directory contains the extracted papaya-zip?

leonvarga commented 11 months ago

You were right, the public repository was not fully up-to-date.

With the commit 42e032b the training for papayas should be possbile.

Best regards, Leon

YeisonJimenez commented 11 months ago

Thank you so much!