Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mindone/transformers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,8 @@
Starcoder2Model,
Starcoder2PreTrainedModel,
)
from .models.superglue import SuperGlueForKeypointMatching, SuperGluePreTrainedModel
from .models.superpoint import SuperPointForKeypointDetection, SuperPointPreTrainedModel
from .models.swiftformer import SwiftFormerForImageClassification, SwiftFormerModel, SwiftFormerPreTrainedModel
from .models.swin import (
SwinBackbone,
Expand Down
4 changes: 4 additions & 0 deletions mindone/transformers/models/auto/configuration_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@
("mra", "MraConfig"),
("nystromformer", "NystromformerConfig"),
("starcoder2", "Starcoder2Config"),
("superglue", "SuperGlueConfig"),
("superpoint", "SuperPointConfig"),
("mt5", "MT5Config"),
("table-transformer", "TableTransformerConfig"),
("musicgen_melody", "MusicgenMelodyConfig"),
Expand Down Expand Up @@ -528,6 +530,8 @@
("stablelm", "StableLm"),
("starcoder2", "Starcoder2"),
("squeezebert", "SqueezeBERT"),
("superglue", "SuperGlue"),
("superpoint", "SuperPoint"),
("swin2sr", "Swin2SR"),
("t5", "T5"),
("t5v1.1", "T5v1.1"),
Expand Down
7 changes: 6 additions & 1 deletion mindone/transformers/models/auto/modeling_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
("camembert", "CamembertModel"),
("bros", "BrosModel"),
("starcoder2", "Starcoder2Model"),
("superglue", "SuperGlueForKeypointMatching"),
("canine", "CanineModel"),
("chameleon", "ChameleonModel"),
("chinese_clip", "ChineseCLIPModel"),
Expand Down Expand Up @@ -1259,7 +1260,11 @@
)


MODEL_FOR_KEYPOINT_DETECTION_MAPPING_NAMES = OrderedDict()
MODEL_FOR_KEYPOINT_DETECTION_MAPPING_NAMES = OrderedDict(
[
("superpoint", "SuperPointForKeypointDetection"),
]
)


MODEL_FOR_TEXT_ENCODING_MAPPING_NAMES = OrderedDict(
Expand Down
17 changes: 17 additions & 0 deletions mindone/transformers/models/superglue/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# This code is adapted from https://github.com/huggingface/transformers
# with modifications to run transformers on mindspore.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from .modeling_superglue import SuperGlueForKeypointMatching, SuperGluePreTrainedModel
849 changes: 849 additions & 0 deletions mindone/transformers/models/superglue/modeling_superglue.py

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions mindone/transformers/models/superpoint/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# This code is adapted from https://github.com/huggingface/transformers
# with modifications to run transformers on mindspore.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from .modeling_superpoint import SuperPointForKeypointDetection, SuperPointPreTrainedModel
Loading