gpt4 book ai didi

mysql - 带有可过滤标签的图像数据库

转载 作者:行者123 更新时间:2023-11-29 06:58:24 25 4
gpt4 key购买 nike

我目前有 2000 多张图像需要添加到数据库中,连同与每张图像关联的标签,然后能够根据一系列下拉框中的标签匹配将图像拉到网页上

目前它们在 zenphoto 画廊中,但我正在考虑从头开始做这件事,因为它不能满足我的需要。

谁能帮助我从哪里开始?或者有一些类似的例子我可以看看

感谢任何帮助

最佳答案

一个相对简单的标记起始模式如下所示:

image
========
id -- identity, autoincrement
location -- varchar(250), or however long (url)
title -- varchar(50)

tag
========
id -- identity, autoincrement
name -- varchar(50)
description -- varchar(250)

image_tag
=========
imageId -- fk to image.id
tagId -- fk to tag.id

元组 (imageId, tagId) 应该是唯一的。

如果您想处理国际化标签,请改用下表:

language
==========
id -- identity, autoincrement
ISO3 -- Standard ISO 3-character code
language -- Standard ISO name of the language (which may all be in english...)

tag
======
id -- identity, autoincrement
name -- varchar(50) - it's debatable whether tag names should be
- translated, or left in the originating language

internationalized_tag
=======================
tagId -- fk reference to tag.id
languageId -- fk reference to language.id
name -- varchar(50) - see tag.name
description -- varchar(250) - translated description text.

显然您可以在这里做更多的事情,但这应该让您入门。

关于mysql - 带有可过滤标签的图像数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11398051/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com