| 13 | |
| 14 | |
| 15 | def test_standard_represent(): |
| 16 | img_path = "dataset/img1.jpg" |
| 17 | embedding_objs = DeepFace.represent(img_path) |
| 18 | # type should be list of dict |
| 19 | assert isinstance(embedding_objs, list) |
| 20 | |
| 21 | for embedding_obj in embedding_objs: |
| 22 | assert isinstance(embedding_obj, dict) |
| 23 | |
| 24 | embedding = embedding_obj["embedding"] |
| 25 | logger.debug(f"Function returned {len(embedding)} dimensional vector") |
| 26 | assert len(embedding) == 4096 |
| 27 | logger.info("✅ test standard represent function done") |
| 28 | |
| 29 | |
| 30 | def test_standard_represent_with_io_object(): |