Skip to content

Commit

Permalink
Merge pull request #943 from roboflow/revert-935-resnet_api
Browse files Browse the repository at this point in the history
Revert "Added ResNet Classification Model Support"
  • Loading branch information
PawelPeczek-Roboflow authored Jan 14, 2025
2 parents c2b5b9f + 15d7436 commit ad79281
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 258 deletions.
5 changes: 3 additions & 2 deletions inference/core/models/classification_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,9 @@ def preprocess(

img_in /= 255.0

mean = self.preprocess_means
std = self.preprocess_stds
mean = (0.5, 0.5, 0.5)
std = (0.5, 0.5, 0.5)

img_in = img_in.astype(np.float32)

img_in[:, 0, :, :] = (img_in[:, 0, :, :] - mean[0]) / std[0]
Expand Down
1 change: 0 additions & 1 deletion inference/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
pass

from inference.models.vit import VitClassification
from inference.models.resnet import ResNetClassification
from inference.models.yolact import YOLACT
from inference.models.yolonas import YOLONASObjectDetection
from inference.models.yolov5 import YOLOv5InstanceSegmentation, YOLOv5ObjectDetection
Expand Down
201 changes: 0 additions & 201 deletions inference/models/resnet/LICENSE.txt

This file was deleted.

1 change: 0 additions & 1 deletion inference/models/resnet/__init__.py

This file was deleted.

45 changes: 0 additions & 45 deletions inference/models/resnet/resnet_classification.py

This file was deleted.

5 changes: 0 additions & 5 deletions inference/models/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from inference.core.utils.function import deprecated
from inference.models import (
YOLACT,
ResNetClassification,
VitClassification,
YOLONASObjectDetection,
YOLOv5InstanceSegmentation,
Expand All @@ -33,10 +32,6 @@
ROBOFLOW_MODEL_TYPES = {
("classification", "stub"): ClassificationModelStub,
("classification", "vit"): VitClassification,
("classification", "resnet18"): ResNetClassification,
("classification", "resnet34"): ResNetClassification,
("classification", "resnet50"): ResNetClassification,
("classification", "resnet101"): ResNetClassification,
("classification", "yolov8"): YOLOv8Classification,
("classification", "yolov8n"): YOLOv8Classification,
("classification", "yolov8s"): YOLOv8Classification,
Expand Down
3 changes: 0 additions & 3 deletions inference/models/vit/vit_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ class VitClassification(ClassificationBaseOnnxRoboflowInferenceModel):
multiclass (bool): A flag that specifies if the model should handle multiclass classification.
"""

preprocess_means = [0.5, 0.5, 0.5]
preprocess_stds = [0.5, 0.5, 0.5]

def __init__(self, *args, **kwargs):
"""Initializes the VitClassification instance.
Expand Down

0 comments on commit ad79281

Please sign in to comment.