
## Usage:
Follow the following code example to use this model.
```python
# import libraries
from transformers import AutoModel, AutoModelForImageClassification
import torch
from datasets import load_dataset

# load dataset
dataset = load_dataset("competitions/aiornot")

# list of images
images = dataset["test"][10:20]["image"]

# load models
feature_extractor = AutoModel.from_pretrained(
    "RishiDarkDevil/ai-image-det-resnet152", trust_remote_code=True).to('cuda')
classifier = AutoModelForImageClassification.from_pretrained(
    "RishiDarkDevil/ai-image-det-resnet152", trust_remote_code=True).to('cuda')

# extract features from images
inputs = feature_extractor(images)

# classification using extracted features
with torch.no_grad():
    logits = classifier(inputs)['logits']

# model predicts one of the 2 classes
predicted_label = logits.argmax(-1)

# predictions
print(predicted_label) # 0 is Not AI, 1 is AI
```

**Backbone for Feature Extraction: ResNet152**

### Performance
- Trained MLP Fine-tuning layers for 150 epochs.
- Accuracy: 0.9250 on validation data (~5% of the training data).
{"language": ["en"], "license": "mit", "tags": ["classification", "computer vision"], "datasets": ["competitions/aiornot"], "metrics": ["accuracy"]}
transformers pytorch resnet feature-extraction classification computer vision custom_code en dataset:competitions/aiornot license:mit has_space region:us
TAGS
#transformers #pytorch #resnet #feature-extraction #classification #computer vision #custom_code #en #dataset-competitions/aiornot #license-mit #has_space #region-us 


## Usage:
Follow the following code example to use this model.


Backbone for Feature Extraction: ResNet152

### Performance
- Trained MLP Fine-tuning layers for 150 epochs.
- Accuracy: 0.9250 on validation data (~5% of the training data).
## Usage:
Follow the following code example to use this model.


Backbone for Feature Extraction: ResNet152 ### Performance
- Trained MLP Fine-tuning layers for 150 epochs.
- Accuracy: 0.9250 on validation data (~5% of the training data).
TAGS
#transformers #pytorch #resnet #feature-extraction #classification #computer vision #custom_code #en #dataset-competitions/aiornot #license-mit #has_space #region-us 
 ## Usage:
Follow the following code example to use this model.


Backbone for Feature Extraction: ResNet152 ### Performance
- Trained MLP Fine-tuning layers for 150 epochs.
- Accuracy: 0.9250 on validation data (~5% of the training data).
TAGS
#transformers #pytorch #resnet #feature-extraction #classification #computer vision #custom_code #en #dataset-competitions/aiornot #license-mit #has_space #region-us 
## Usage:
Follow the following code example to use this model.


Backbone for Feature Extraction: ResNet152### Performance
- Trained MLP Fine-tuning layers for 150 epochs.
- Accuracy: 0.9250 on validation data (~5% of the training data).