Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

ValueError when running "run_video.py" #7

Open
SAIL-LAB155 opened this issue Dec 29, 2020 · 0 comments
Open

ValueError when running "run_video.py" #7

SAIL-LAB155 opened this issue Dec 29, 2020 · 0 comments

Comments

@SAIL-LAB155
Copy link

Hello.
When I am running the webcam demo with "python run_video.py -c configs/mpii/config_blazepose_mpii_pushup_heatmap_bce_regress_huber.json -m blazepose_pushup_v1.h5 -v webcam --confidence 0.3", an error occurs:

**Traceback (most recent call last):
File "run_video.py", line 45, in
model = trainer.load_model(config, args.model)
File "/home/hkuit155/Desktop/tf-blazepose/src/trainers/blazepose_trainer.py", line 162, in load_model
model.compile()
File "/home/hkuit155/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/training/tracking/base.py", line 457, in _method_wrapper
result = method(self, *args, **kwargs)
File "/home/hkuit155/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 446, in compile
self._compile_weights_loss_and_weighted_metrics()
File "/home/hkuit155/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/training/tracking/base.py", line 457, in _method_wrapper
result = method(self, *args, kwargs)
File "/home/hkuit155/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 1592, in _compile_weights_loss_and_weighted_metrics
self.total_loss = self._prepare_total_loss(masks)
File "/home/hkuit155/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 1691, in _prepare_total_loss
raise ValueError('The model cannot be compiled '
ValueError: The model cannot be compiled because it has no loss to optimize.

It seems that the model needs to be trained before running with webcam. And the error appears when training begins.
Are there any solutions for it? I am looking forward to your reply. Thans you so much.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant