🍬Java轻量级、免费、离线AI工具箱,致力于帮助Java开发者零门槛使用AI算法模型
像Hutool一样简单易用的Java AI工具箱
|
人脸检测(Face Detection) - 5点人脸关键点定位 |
|
|
|
人脸比对1:1 |
|
|
|
人证核验 |
|
|
|
人脸比对1:N - 人脸注册 - 人脸库查询 - 人脸库删除 |
|
|
|
人脸属性检测 - 性别检测(GenderDetection)- 年龄检测(AgeDetection) - 口罩检测(Face Mask Detection) - 眼睛状态检测(EyeClosenessDetection) - 脸部姿态检测(FacePoseEstimation) |
|
|
|
活体检测 |
|
|
|
人脸表情识别 |
|
|
|
图像分类 |
|
|
|
目标检测(Object Detection) - 视频流目标检测:rtsp、摄像头、视频文件等 |
|
|
|
语义分割 |
|
|
|
实例分割 |
|
|
|
自定义目标训练+检测 |
|
|
|
行人检测(Person Detection) |
|
|
|
人类动作识别 |
|
|
|
OBB旋转框检测 |
|
|
|
零样本目标检测 |
|
|
|
姿态估计 |
|
|
|
OCR文字识别 - 支持印刷体识别 - 支持手写字识别 |
|
|
|
OCR文字识别 - 表格识别(Table Structure Recognition) |
|
|
|
车牌识别 - 车牌颜色识别 |
|
|
|
机器翻译 |
|
|
|
语音识别 - 支持实时语音识别 |
|
|
|
语音合成(ASR) |
|
|
|
CLIP - 文搜图- 图搜图 - 图搜文 |
|
-------------------------------------------------------------------------------
## 📦 安装
### 1、环境要求
- Java 版本:**JDK 8或更高版本**
- 操作系统:不同模型支持的系统不一样,具体请查看[文档](http://doc.smartjavaai.cn)
### 2、Maven
在项目的 `pom.xml` 的 `dependencies` 中可以一次性引入全部功能(如下所示)。
⚠️ **注意:不推荐直接引入全部依赖**,更推荐根据实际需求,按功能模块单独引入,避免引入不必要的包。
详细引入方式请查看 [文档](http://doc.smartjavaai.cn/install.html)、或查看[示例代码](https://gitee.com/dengwenjie/SmartJavaAI/tree/master/examples)
### 3、完整示例代码
[示例代码](https://gitee.com/dengwenjie/SmartJavaAI/tree/master/examples)
本项目在 `examples` 文件夹下提供了多个示例工程,用于演示各功能模块的使用方法:
* `face-example`:人脸检测、人脸识别等功能示例
* `vision-example`:通用视觉检测示例:目标检测、目标分割、图像分类等
* `ocr-example`:OCR文字识别、车牌识别等功能示例
* `translate-example`:机器翻译功能示例
* `speech-example`:语音识别、语音合成功能示例
#### 运行方式
如果你只想运行某个示例,请按以下方式操作:
1. 打开 IDEA(或你喜欢的 IDE)
2. 选择 **“Open”**,然后仅导入 `examples` 目录下对应的示例项目,例如:
```
examples/face-example
```
3. IDEA 会自动识别并加载依赖。若首次导入,请等待 Maven 下载依赖完成。
4. 请从我们提供的 百度网盘 中下载模型及其附带文件,并在示例代码中将模型路径修改为您本地的实际路径。
5. 可通过查看每个 Java 文件顶部的注释了解对应功能,或参考 README 文件中对各 Java 文件功能的说明,运行相应的测试方法进行体验。
### 4、文档地址
[开发文档](http://doc.smartjavaai.cn)
### 5、模型简介及下载
[模型下载](https://pan.baidu.com/s/1dlZxWEMULnaietMDUJh38g?pwd=1234)
#### 人脸模块
**人脸检测模型(FaceDetection、FaceLandmarkExtraction)**
| 模型名称 | 引擎 | 模型简介 | 模型开源网站 |
|------------------------------|-------------|------------------------------|---------------------------------------------------------------------------------|
| MTCNN(均衡) | PyTorch | 使用最广泛的模型之一,经典多阶段人脸检测,速度与精度均衡 | [Github](https://github.com/timesler/facenet-pytorch) |
| SeetaFace6(均衡模型) | C++ | 中科视拓最新开放的开源免费的全栈人脸识别工具包 | [Github](https://github.com/seetafaceengine/SeetaFace6) |
| RetinaFace(高精度) | PyTorch | 基于单阶段检测的多尺度人脸检测 | [Github](https://github.com/biubug6/Pytorch_Retinaface) |
| RetinaFace_1080x720(高精度) | OnnxRuntime | 针对高分辨率图像优化的 RetinaFace 模型 | [Github](https://github.com/biubug6/Pytorch_Retinaface) |
| RetinaFace_640x640(高精度) | OnnxRuntime | 针对低分辨率图像优化的 RetinaFace 模型 | [Github](https://github.com/biubug6/Pytorch_Retinaface) |
| yolov5face_n_0.5_320x320(极速) | OnnxRuntime | YOLOv5 小型人脸检测模型,设计轻量,适合快速推理 | 无 |
| yolov5face_m_640x640(极速) | OnnxRuntime | YOLOv5 中型人脸检测模型 | 无 |
| UltraLightFastGenericFace(极速) | PyTorch | 针对边缘计算设备设计的轻量人脸检测模型 | [Github](https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB) |
---
**人脸识别模型(FaceRecognition)**
| 模型名称 | 引擎 | 模型简介 | 模型开源网站 |
|-------------------------------|---------------------|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|
| InsightFace_IR-SE50(高精度) | PyTorch | 这是对 ArcFace(论文)和 InsightFace(GitHub)的 PyTorch 重新实现 | [Github](https://github.com/TreB1eN/InsightFace_Pytorch) |
| InsightFace_Mobilefacenet(极速) | PyTorch | (轻量级)这是对 ArcFace(论文)和 InsightFace(GitHub)的 PyTorch 重新实现 | [Github](https://github.com/TreB1eN/InsightFace_Pytorch) |
| FaceNet | PyTorch | 基于 PyTorch 的 Inception ResNet(V1)模型仓库 | [Github](https://github.com/timesler/facenet-pytorch) |
| ElasticFace | PyTorch | 基于 CVPRW2022 论文《ElasticFace: Elastic Margin Loss for Deep Face Recognition》实现的人脸识别模型 | [Github](https://github.com/fdbtrs/ElasticFace) |
| SeetaFace6 | C++ | 中科视拓最新开放的开源免费的全栈人脸识别工具包 | [Github](https://github.com/seetafaceengine/SeetaFace6) |
| SphereFace-20A | PyTorch+OnnxRuntime | SphereFace:Deep Hypersphere Embedding for Face Recognition | [Github](https://github.com/wy1iu/sphereface) |
| DREAM_IJBA_RES18 | OnnxRuntime | DREAM block for Pose-Robust Face Recognition | [Github](https://github.com/penincillin/DREAM) |
| face.evoLVe | PyTorch | High-Performance Face Recognition Library based on PaddlePaddle & PyTorch | [Github](https://github.com/ZhaoJ9014/face.evoLVe) |
| VGGFace2 | PyTorch | PyTorch Face Recognizer based on 'VGGFace2: A dataset for recognising faces across pose and age'. | [Github](https://github.com/cydonia999/VGGFace2-pytorch) |
**静态活体检测(RGB)模型(Silent face-anti-spoofing、FaceLivenessDetection)**
| 模型名称 | 引擎 | 模型简介 | 模型开源网站 |
|-----------|----------------|-------------------------|----------------------------------------------------------------------|
| MiniVision| OnnxRuntime | 小视科技的静默活体检测 | [Github](https://github.com/minivision-ai/Silent-Face-Anti-Spoofing) |
| IIC_FL(cv_manual_face-liveness_flrgb) | OnnxRuntime | 阿里通义工作室人脸活体检测模型-RGB | [魔塔](https://www.modelscope.cn/models/iic/cv_manual_face-liveness_flrgb/feedback) |
| SeetaFace6 | C++ | 中科视拓最新开放的开源免费的全栈人脸识别工具包 | [Github](https://github.com/seetafaceengine/SeetaFace6) |
**人脸表情识别模型(FacialExpressionRecognition、fer)**
支持功能:
- 支持识别7种表情:neutral(中性)、happy(高兴)、sad(悲伤)、surprise(惊讶)、fear(恐惧)、disgust(厌恶)、anger(愤怒)
| 模型名称 | 引擎 | 模型简介 | 模型开源网站 |
|---------|-----------|--------------------------|----------------------------------------------------------------------|
| DensNet121 | PyTorch| FaceLib的densnet121表情识别模型 | [Github](https://github.com/sajjjadayobi/FaceLib/) |
| FrEmotion| OnnxRuntime | FaceRecognition-LivenessDetection-Javascript | [Github](https://github.com/Faceplugin-ltd/FaceRecognition-LivenessDetection-Javascript) |
**人脸属性识别模型(GenderDetection、AgeDetection、EyeClosenessDetection、FacePoseEstimation)**
支持功能:
- 性别检测
- 年龄检测
- 闭眼检测
- 人脸姿态检测
- 戴口罩检测
| 模型名称 | 模型简介 | 模型开源网站 |
|------------|--------------------------|----------------------------------------------------------------------|
| SeetaFace6 | 中科视拓最新开放的开源免费的全栈人脸识别工具包 | [Github](https://github.com/seetafaceengine/SeetaFace6) |
**人脸质量评估模型(FaceQualityAssessment)**
支持功能:
- 亮度评估
- 清晰度评估
- 完整度评估
- 姿态评估
- 遮挡评估
| 模型名称 | 模型简介 | 模型开源网站 |
|------------|--------------------------|----------------------------------------------------------------------|
| SeetaFace6 | 中科视拓最新开放的开源免费的全栈人脸识别工具包 | [Github](https://github.com/seetafaceengine/SeetaFace6) |
---
#### 图像分类模型(CLS)
**YOLO 系列**
| 模型名称 | 引擎 | 模型简介 | 模型开源网站 |
|-------------|----------------|------------|----------------------------------------------------------------------|
| YOLOV11-cls | OnnxRuntime | 最流行的图像分类模型 | [Github](https://docs.ultralytics.com/zh/models/) |
| YOLOV8-cls | OnnxRuntime | 最流行的图像分类模型 | [Github](https://docs.ultralytics.com/zh/models/) |
#### 目标检测模型
**YOLO 系列**
| 模型名称 | 引擎 | 模型简介 | 模型开源网站 |
|---------|----------------|-------------------------|----------------------------------------------------------------------|
| YOLOV12 | OnnxRuntime | 最流行的目标检测模型 | [Github](https://docs.ultralytics.com/zh/models/) |
| YOLOV11 | OnnxRuntime | 最流行的目标检测模型 | [Github](https://docs.ultralytics.com/zh/models/) |
| YOLOV8 | OnnxRuntime | 最流行的目标检测模型 | [Github](https://docs.ultralytics.com/zh/models/) |
**Tensorflow系列**
仅测试了以下Tensorflow目标检测模型
| 模型名称 | 引擎 | 模型简介 | 模型开源网站 |
|---------|-------------|----------------|----------------------------------------------------------------------|
| EfficientDet | Tensorflow | Tensorflow目标检测 | [Github](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md) |
| SSD MobileNet V2 | Tensorflow | Tensorflow目标检测 | [Github](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md) |
| Faster RCNN Inception Resnet V2 | Tensorflow | Tensorflow目标检测 | [Github](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md) |
**SSD 系列**
| 模型名称 | 引擎 | 骨干网络 | 输入尺寸 |