oliverlevn commited on
Commit
76d828d
·
1 Parent(s): 17b0e09

first-commit

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ third_train.pth filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,13 +1 @@
1
- ---
2
- title: Ocean Faster RCNN
3
- emoji: 📈
4
- colorFrom: blue
5
- colorTo: green
6
- sdk: gradio
7
- sdk_version: 3.35.2
8
- app_file: app.py
9
- pinned: false
10
- license: mit
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+ # ocean-faster-rcnn
 
 
 
 
 
 
 
 
 
 
 
 
app.py ADDED
File without changes
examples/IMG_2380_jpeg_jpg.rf.a23809682eb1466c1136ca0f55de8fb5.jpg ADDED
examples/IMG_2468_jpeg_jpg.rf.c933cc14c99b11a90413a1490d4556db.jpg ADDED
examples/IMG_2477_jpeg_jpg.rf.7b2692f142d53c16ad477065f1f8ae6d.jpg ADDED
examples/IMG_2588_jpeg_jpg.rf.cb9cea8f05891cfd55a3e93f2908201f.jpg ADDED
model.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torchvision
2
+
3
+ def create_fasterrcnn_model(num_classes):
4
+ model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)
5
+
6
+ for param in model.parameters():
7
+ param.requires_grad = False
8
+
9
+ # Redefine the ROI head:
10
+ in_features = model.roi_heads.box_predictor.cls_score.in_features
11
+ # model.roi_heads.box_predictor = model.roi_heads.box_predictor(in_features, out_features =len(categories))
12
+ model.roi_heads.box_predictor = torchvision.models.detection.faster_rcnn.FastRCNNPredictor(in_features, num_classes) # FastRCNNPredictor(in_features, num_classes=len(categories))
13
+
14
+ return model
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ torch==1.12.0
2
+ torchvision==0.13.0
3
+ gradio==3.1.4
third_train.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:663160ca9f7aedfd102ff00c4a36ff3f0115ac8b7a75527c8354067e41f62932
3
+ size 165851031