Comments (16)
百度云盘的两个链接一个是checkpoint,一个是SavedModel。你用的是哪一个呀?
from facial-landmark-detection-hrnet.
SavedModel那一个。
from facial-landmark-detection-hrnet.
可以列出pb文件的完整路径吗?有可能是路径的问题。
from facial-landmark-detection-hrnet.
Construct a face detector.
detector_face = Detector('assets/face_model/saved_model.pb')
# Restore the model.
model = tf.keras.models.load_model("./exported/hrnetv2")
谢谢您的回复,但是我不确定是将下载的模型放到哪句代码中。
from facial-landmark-detection-hrnet.
我以刚才的代码运行后,出现这种情况。
Traceback (most recent call last):
File "C:/Users/RPPG/Desktop/pyCode/facial-landmark-detection-hrnet-master/predict.py", line 34, in
detector_face = Detector('assets/face_model/saved_model.pb')
File "C:\Users\RPPG\Desktop\pyCode\facial-landmark-detection-hrnet-master\face_detector\detector.py", line 33, in init
imported = tf.saved_model.load(saved_model)
File "C:\Users\RPPG\Anaconda3\envs\ippg\lib\site-packages\tensorflow\python\saved_model\load.py", line 859, in load
return load_internal(export_dir, tags, options)["root"]
File "C:\Users\RPPG\Anaconda3\envs\ippg\lib\site-packages\tensorflow\python\saved_model\load.py", line 871, in load_internal
loader_impl.parse_saved_model_with_debug_info(export_dir))
File "C:\Users\RPPG\Anaconda3\envs\ippg\lib\site-packages\tensorflow\python\saved_model\loader_impl.py", line 56, in parse_saved_model_with_debug_info
saved_model = _parse_saved_model(export_dir)
File "C:\Users\RPPG\Anaconda3\envs\ippg\lib\site-packages\tensorflow\python\saved_model\loader_impl.py", line 111, in parse_saved_model
raise IOError("SavedModel file does not exist at: %s/{%s|%s}" %
OSError: SavedModel file does not exist at: assets/face_model/saved_model.pb/{saved_model.pbtxt|saved_model.pb}
Process finished with exit code 1
而且从github上下载代码后,我将asset文件中的原本的模型和变量改成的百度云盘中的模型和变量,不知道这样的操作是否正确。
from facial-landmark-detection-hrnet.
GitHub上下载的代码先不做任何改动。留意这行代码:
model = tf.keras.models.load_model("./exported/hrnetv2")
其中暗含了SavedModel应该存放的位置。你可以把这里的相对路径改为你计算机上的绝对路径。
我留意到你使用的应该是Windows操作系统,注意它的路径表述与Linux不同。所以你可能还需要把检测器加载的文件路径也检查一下:
detector_face = Detector('assets/face_model/saved_model.pb')
from facial-landmark-detection-hrnet.
在使用绝对路径后,还是会报错,跟之前的错误是一样的。
File "C:/Users/RPPG/Desktop/pyCode/landmark/predict.py", line 34, in
detector_face = Detector('assets/face_model/saved_model')
File "C:\Users\RPPG\Desktop\pyCode\landmark\face_detector\detector.py", line 33, in init
imported = tf.saved_model.load(saved_model)
File "C:\Users\RPPG\Anaconda3\envs\ippg\lib\site-packages\tensorflow\python\saved_model\load.py", line 859, in load
return load_internal(export_dir, tags, options)["root"]
File "C:\Users\RPPG\Anaconda3\envs\ippg\lib\site-packages\tensorflow\python\saved_model\load.py", line 871, in load_internal
loader_impl.parse_saved_model_with_debug_info(export_dir))
File "C:\Users\RPPG\Anaconda3\envs\ippg\lib\site-packages\tensorflow\python\saved_model\loader_impl.py", line 56, in parse_saved_model_with_debug_info
saved_model = _parse_saved_model(export_dir)
File "C:\Users\RPPG\Anaconda3\envs\ippg\lib\site-packages\tensorflow\python\saved_model\loader_impl.py", line 111, in parse_saved_model
raise IOError("SavedModel file does not exist at: %s/{%s|%s}" %
OSError: SavedModel file does not exist at: assets/face_model/saved_model/{saved_model.pbtxt|saved_model.pb}
Process finished with exit code 1
在网上查询错误原因后,将tensorflow改成了gpu版本,也是不对的。
我所有的错做过程如下:
在github上下载源代码。然后在github上下载models文件夹和face-detector文件夹所需要的代码。然后在百度云盘下载提供的已经训练好的model。
detector_face = Detector('assets/face_model/saved_model.pb')
这里使用的是原文件所提供的model路径
model = tf.keras.models.load_model("./exported/hrnetv2")
这里使用了从百度云盘所使用的model路径
真的很感谢您能在百忙之中回复我的信息。
from facial-landmark-detection-hrnet.
非常感谢,我重新下载了一遍代码之后问题解决了,谢谢
from facial-landmark-detection-hrnet.
客气了。有时间的话可以学习一下Git,这样遇到的问题会少很多。
from facial-landmark-detection-hrnet.
hi ,really sorry to disturb you but i have already downloaded from baidu cloud disk but cannot find "model.pbtxt|saved_model.pb"
from facial-landmark-detection-hrnet.
from facial-landmark-detection-hrnet.
@anil-bit Please download the checkpoint file from GoogleDrive.
from facial-landmark-detection-hrnet.
谢谢你
from facial-landmark-detection-hrnet.
谢谢你
😃
from facial-landmark-detection-hrnet.
from facial-landmark-detection-hrnet.
使用哪一个?
from facial-landmark-detection-hrnet.
Related Issues (20)
- edge TPU版本 HOT 14
- No access to the pretrained-model HOT 3
- 百度云盘没有下载到hrnet的模型 HOT 5
- Stability and accuracy HOT 1
- Checkpoints on Drive or Dropbox
- NME with original image dimensions HOT 2
- Model Training HOT 4
- Multi-face detection HOT 6
- how to create dataset? HOT 5
- pretrained weight model HOT 1
- how come can use tfrecord by face-mesh-generator? HOT 1
- Need Help
- Pretrained model
- Help to load HRNet model with OpenCV HOT 5
- asking about dataset creation HOT 3
- Training error HOT 4
- generate_mesh_dataset.py HOT 1
- No module named 'face_detector.detector HOT 2
- WFLW数据集使用
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facial-landmark-detection-hrnet.