Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

本地推理效果和huggingface demo不一样 #145

Open
TideDra opened this issue Sep 18, 2024 · 4 comments
Open

本地推理效果和huggingface demo不一样 #145

TideDra opened this issue Sep 18, 2024 · 4 comments

Comments

@TideDra
Copy link

TideDra commented Sep 18, 2024

感谢大佬开源的模型!
我在huggingface demo上试用了一下,效果很不错:
截屏2024-09-18 23 08 24

但是在本地用相同的配置跑同一张图片,检测效果却变差了:
命令:p2t predict -i "/Users/geary.z/Desktop/截屏2024-09-18 18.10.00.png" --save-debug-res debug.jpg --file-type text_formula --layout-config "{\"scores_thresh\": 0.45}"
输出:

For a single mutation in the learngenes, we consider its possibility independently across all layers, with each layer exhibiting a probability $p_{m}$ for undergoing this mutation. The likelihood of either increasing or decreasing a specific kernel in eacn layer is then computed as follows:
where $p_{l}^{+}$ decreasing a kernel in
$$
p_{l}^{+}=\alpha\cdot\frac{| K_{l} |} {n_{K}^{l}-| K_{l} |} \quad\mathrm{a n d} \quad p_{l}^{-}=1-p_{l}^{+} \tag{1}
$$
a $p_{l}^{-}$ represent the probabilities of increasing and
 $\l$ -th layer of the learngene.

debug

请问这是怎么回事呢

@TideDra
Copy link
Author

TideDra commented Sep 18, 2024

这是原图:
截屏2024-09-18 18 10 00

@breezedeus
Copy link
Owner

对比下具体的参数取值。demo 的代码都是开源的,可以看看差异。

@TideDra
Copy link
Author

TideDra commented Sep 19, 2024

对比下具体的参数取值。demo 的代码都是开源的,可以看看差异。

我fork了demo的代码,分别部署在了huggingface space(cpu),google colab(cpu)和本地(macos14, m3),发现用cpu跑都正常,只有m3跑出来的效果很差,请问这是啥原因呢

@breezedeus
Copy link
Owner

我的 M3 跑没发现类似的问题。你可以试试 M3 命令行结果是否跟 web 一致。

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

No branches or pull requests

2 participants