Views
No views yet
1from inference import test_image
2
3# Test an image
4result = test_image(
5 "path/to/image.jpg",
6 hf_repo_id="nahid112376/ai-detection-cnn",
7 threshold=0.5
8)
9
10print(f"Label: {result['label']}")
11print(f"Confidence: {result['confidence']*100:.2f}%")1pip install torch transformers huggingface_hub pillow numpy
2pip install qwen-vl-utilscnn_regression_model.pth: Trained model weightsinference.py: Inference scriptextract_features.py: Feature extraction script1@misc{ai-detection-cnn,
2 author = {bartazable},
3 title = {AI Detection CNN Model},
4 year = {2026},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/nahid112376/ai-detection-cnn}}
7}