diff --git a/.gitignore b/.gitignore index 3081718..2e694d3 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,10 @@ data/vids/* data/screen/* data/json/* data/*.* - +!data/vids/example.mp4 +!data/example.mp4.html +!data/json/example.mp4.json +!data/screen/example.mp4 # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/data/example.mp4.html b/data/example.mp4.html new file mode 100644 index 0000000..f0d1b91 --- /dev/null +++ b/data/example.mp4.html @@ -0,0 +1,31 @@ + + + example.mp4 + +

example.mp4


+

1080x1920


+

16.2 s.


+
+
+
+

screen/example.mp4/1.jpg

+ screen/example.mp4/1.jpg
+

drawings : 0.16
hentai : 0.03
neutral : 99.03
porn : 0.63
sexy : 0.15

+
+
+

screen/example.mp4/6.jpg

+ screen/example.mp4/6.jpg
+

drawings : 0.28
hentai : 0.03
neutral : 99.3
porn : 0.3
sexy : 0.09

+
+
+

screen/example.mp4/11.jpg

+ screen/example.mp4/11.jpg
+

drawings : 1.16
hentai : 0.03
neutral : 98.55
porn : 0.15
sexy : 0.1

+
+
+

screen/example.mp4/16.jpg

+ screen/example.mp4/16.jpg
+

drawings : 0.14
hentai : 0.02
neutral : 98.66
porn : 0.69
sexy : 0.49

+
+
+ \ No newline at end of file diff --git a/data/json/example.mp4.json b/data/json/example.mp4.json new file mode 100644 index 0000000..07d9400 --- /dev/null +++ b/data/json/example.mp4.json @@ -0,0 +1,39 @@ +{ + "height": 1080.0, + "width": 1920.0, + "duration": 16.2, + "frames": { + "1": { + "drawings": 0.001603447599336505, + "hentai": 0.00029177090618759394, + "neutral": 0.9903027415275574, + "porn": 0.006316039711236954, + "sexy": 0.0014860795345157385, + "file": "screen/example.mp4/1.jpg" + }, + "6": { + "drawings": 0.0028055706061422825, + "hentai": 0.0002788607671391219, + "neutral": 0.9929991960525513, + "porn": 0.0030449822079390287, + "sexy": 0.0008713431307114661, + "file": "screen/example.mp4/6.jpg" + }, + "11": { + "drawings": 0.011603194288909435, + "hentai": 0.00034240508102811873, + "neutral": 0.9855231046676636, + "porn": 0.0014979398110881448, + "sexy": 0.001033419743180275, + "file": "screen/example.mp4/11.jpg" + }, + "16": { + "drawings": 0.0014052210608497262, + "hentai": 0.00019437579612713307, + "neutral": 0.9866281151771545, + "porn": 0.006891936529427767, + "sexy": 0.004880368243902922, + "file": "screen/example.mp4/16.jpg" + } + } +} \ No newline at end of file diff --git a/data/screen/example.mp4/1.jpg b/data/screen/example.mp4/1.jpg new file mode 100644 index 0000000..0a87e12 Binary files /dev/null and b/data/screen/example.mp4/1.jpg differ diff --git a/data/screen/example.mp4/11.jpg b/data/screen/example.mp4/11.jpg new file mode 100644 index 0000000..7309c2e Binary files /dev/null and b/data/screen/example.mp4/11.jpg differ diff --git a/data/screen/example.mp4/16.jpg b/data/screen/example.mp4/16.jpg new file mode 100644 index 0000000..c0db77c Binary files /dev/null and b/data/screen/example.mp4/16.jpg differ diff --git a/data/screen/example.mp4/6.jpg b/data/screen/example.mp4/6.jpg new file mode 100644 index 0000000..9228aee Binary files /dev/null and b/data/screen/example.mp4/6.jpg differ diff --git a/data/vids/example.mp4 b/data/vids/example.mp4 new file mode 100644 index 0000000..747b37f Binary files /dev/null and b/data/vids/example.mp4 differ diff --git a/main.py b/main.py index 0cda4f7..d9304b8 100644 --- a/main.py +++ b/main.py @@ -14,7 +14,7 @@ def save_frame(screen_folder, secs, vid): return save_name model = predict.load_model('./data/model/nsfw_mobilenet2.224x224.h5') -file_path = "./data/vids/5.mp4" +file_path = "./data/vids/example.mp4" vid = cv2.VideoCapture( file_path ) height = vid.get(cv2.CAP_PROP_FRAME_HEIGHT) width = vid.get(cv2.CAP_PROP_FRAME_WIDTH)