rizavelioglu commited on
Commit
1dd46ee
0 Parent(s):

Initial commit

Browse files
Files changed (4) hide show
  1. .gitattributes +34 -0
  2. README.md +76 -0
  3. facere_base.onnx +3 -0
  4. facere_plus.onnx +3 -0
.gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license_name: server-side-public-license
3
+ license_link: https://www.mongodb.com/licensing/server-side-public-license
4
+ tags:
5
+ - fashion
6
+ - cloth-retrieval
7
+ - e-commerce
8
+ - segmentation
9
+ datasets:
10
+ - rizavelioglu/fashionfail
11
+ - detection-datasets/fashionpedia
12
+ pipeline_tag: object-detection
13
+ ---
14
+
15
+ ## Models
16
+
17
+ The models proposed in the paper ["FashionFail: Addressing Failure Cases in Fashion Object Detection and Segmentation"](https://arxiv.org/abs/2404.08582)
18
+
19
+ ## Usage
20
+
21
+ ```python
22
+ from torchvision.io import read_image
23
+ from torchvision.models.detection import MaskRCNN_ResNet50_FPN_Weights
24
+ from huggingface_hub import hf_hub_download
25
+
26
+ path_onnx = hf_hub_download(
27
+ repo_id="rizavelioglu/segmentation",
28
+ filename="facere_base.onnx", # or "facere_plus.onnx"
29
+ )
30
+
31
+ # Load pre-trained model transformations.
32
+ weights = MaskRCNN_ResNet50_FPN_Weights.DEFAULT
33
+ transforms = weights.transforms()
34
+
35
+ # Load image and apply original transformation to the image.
36
+ img = read_image(image)
37
+ img_transformed = transforms(img)
38
+
39
+ # Create an inference session.
40
+ ort_session = onnxruntime.InferenceSession(
41
+ path_onnx, providers=["CUDAExecutionProvider", "CPUExecutionProvider"]
42
+ )
43
+
44
+ # Run inference on the input.
45
+ ort_inputs = {
46
+ ort_session.get_inputs()[0].name: img_transformed.unsqueeze(dim=0).numpy()
47
+ }
48
+ ort_outs = ort_session.run(None, ort_inputs)
49
+
50
+ # Parse the model output.
51
+ boxes, labels, scores, masks = ort_outs
52
+ ```
53
+
54
+ > Check out the demo code on [HuggingFace Spaces][ff-hf_spaces] for visualizing the output.
55
+
56
+ > Also, check out [FashionFail's GitHub repository](https://github.com/rizavelioglu/fashionfail) to get more information on
57
+ > training, inference, and evaluation.
58
+
59
+ ### License
60
+ TL;DR: Not available for commercial use, unless the FULL source code is shared! \
61
+ This project is intended solely for academic research. No commercial benefits are derived from it.
62
+ Models are licensed under [Server Side Public License (SSPL)](https://www.mongodb.com/legal/licensing/server-side-public-license)
63
+
64
+ ### Citation
65
+ If you find this repository useful in your research, please consider giving a star ⭐ and a citation:
66
+ ```
67
+ @inproceedings{velioglu2024fashionfail,
68
+ author = {Velioglu, Riza and Chan, Robin and Hammer, Barbara},
69
+ title = {FashionFail: Addressing Failure Cases in Fashion Object Detection and Segmentation},
70
+ journal = {IJCNN},
71
+ eprint = {2404.08582},
72
+ year = {2024},
73
+ }
74
+ ```
75
+
76
+ [ff-hf_spaces]: https://huggingface.co/spaces/rizavelioglu/fashionfail
facere_base.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:01f6d63a33ab14ab317c094e1c6948f2f4cab386b2a2f8840f03779916709363
3
+ size 184743537
facere_plus.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:962749b2343e6b6fe498df2328683be5c5db315590ea179d94cbcf28d7629103
3
+ size 184226861