Comments (20)
test 时用到 ground truth 的数据只是为了计算误差, 并不影响检测
from face-alignment-at-3000fps.
另外, 你贴的第一段代码是在读取图片中人脸框的数据, 真实形状只是用来裁剪图像, 减少内存消耗而已, 计算 landmark 时并没有用到真实形状的信息, 但是需要人脸框信息
from face-alignment-at-3000fps.
重新把ground_true去除了。但是模型还是挺大的,如果我想把模型压缩到几M内,有什么好的建议。
from face-alignment-at-3000fps.
模型文件中应该没有存储 ground_truth 数据
其实 30M+ 的模型文件已经蛮小了, 如果你还想压缩的话, 建议你更改源码中的几个 Read
Write
函数, 参数类型可以从 double 降级到 float 这个能够减少将近一半的数据, 但是会有相应的损失. 另外一种方法, 你可以考虑利用 zlib 等压缩库, 因为代码中是 Raw Data 直接以二进制形式输出, 你可以考虑利用压缩库进行数据压缩.
但是我认为想压缩到 10M 以内不太现实, 除非修改模型参数, 减少模型的参数.
from face-alignment-at-3000fps.
恩是的,我是说去除了利用ground true裁剪的那块,模型大小和参数我觉的可以试着改一下。
from face-alignment-at-3000fps.
如果把stage的个数减少,
from face-alignment-at-3000fps.
调整模型的参数需要自己训练, 降低模型复杂度可能会使预测效果变差, 需要自己衡量. 这个模型的我本人认为调得效果还可以. 你是什么需求, 需要这么小的模型文件, 嵌入式?
from face-alignment-at-3000fps.
模型效果很ok的。手机上的,手机上不可能让他们载个这么大的文件吧。
from face-alignment-at-3000fps.
个人建议
- 将模型数据从 double 将级到 float 能在很大程度上减小模型文件的大小(个人认为可以减少一半的大小), 在此基础上利用类似 zlib 这种压缩库在程序数据的写入和载入时进行数据压缩.
- 调整模型的大小, 重新训练, 但是如果用现有代码进行数据的读写, 也不太可能降低到 10M 以内(模型太小, 效果一定差), 仍然需要考虑 1 中的数据格式和压缩.
from face-alignment-at-3000fps.
你训练模型的时候用的什么数据,读多少张图片,我训练用helen的数据,经常出现了outofmemory的问题。我的机器8g的内存。
from face-alignment-at-3000fps.
内存不足考虑将程序编译成 64 位, 我一般在服务器上训练, 内存基本不是问题.
关于数据集, README 中有提到
from face-alignment-at-3000fps.
好的谢谢啦。
from face-alignment-at-3000fps.
@NanYoMy你好,请问下载好数据集,train和test是按照什么标准分的呀?
from face-alignment-at-3000fps.
@happygao 数据集本身是分了 train test 的
from face-alignment-at-3000fps.
@luoyetx按照readme的说明,我现在已经训练好了模型,但是怎么将其用到其他数据集上呀?即就是用别的图像能否将点标记出来?
from face-alignment-at-3000fps.
@happygao 你需要做人脸检测来输出人脸框,框的尺度最好和训练时的尺度一致
from face-alignment-at-3000fps.
@luoyetx 如果我想用到其他图片上,是不是必须要有.pts文件呀?
from face-alignment-at-3000fps.
@happygao 不需要
from face-alignment-at-3000fps.
@luoyetx 麻烦您能说的仔细一点吗?如果在其他图片上进行标记其关键点,是不是将test文件夹的图片换成需要检测的就可以了吗?麻烦您给我说一下步骤吧,谢谢
from face-alignment-at-3000fps.
参考 test.cpp 的 run 函数,用检测器来检测人脸 bbox
from face-alignment-at-3000fps.
Related Issues (20)
- alignment model HOT 2
- Assertion error on void genTxt() HOT 1
- Dataset site is offline (http://ibug.doc.ic.ac.uk/resources/facial-point-annotations)
- Dataset site is offline
- Assertion fail on FaceAlignment prepare HOT 3
- memory free ERROR @x64 train HOT 4
- variance question
- test
- is pupils landmark wrong in common.cpp? HOT 1
- webcam model test? HOT 1
- 代码速度问题 HOT 1
- out of Memory HOT 2
- SWAP of landmarks HOT 2
- SimilarityTransform returning identity HOT 4
- dataset挂了 HOT 1
- 怎样写数据库? HOT 7
- 能分享一下训练好的模型吗? HOT 2
- why current_shapes[idx] = bboxes_[i].ReProject(bboxes_[k].Project(gt_shapes_[k])) ? HOT 1
- Lib versions problem HOT 2
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 face-alignment-at-3000fps.