Skip to content

Commit

Permalink
fixed: frame deletion, documentations edits
Browse files Browse the repository at this point in the history
  • Loading branch information
atomashevic committed Dec 8, 2023
1 parent 96728d7 commit f11cca2
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 32 deletions.
3 changes: 0 additions & 3 deletions R/image_scores.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
#' @param face_selection The method to select the face in the image. Can be "largest" or "left" or "right". Default is "largest" and will select the largest face in the image. "left" and "right" will select the face on the far left or the far right side of the image. Face_selection method is irrelevant if there is only one face in the image.
#' @return A data frame containing the scores for each class.
#'
#' @examples
#' \donttest{boris_image = "inst/extdata/boris-1.png"
#' image_scores(boris_image, c("anger", "disgust", "fear", "happiness", "sadness", "surprise", "neutral"))}
#'
#' @importFrom reticulate source_python
#' @export
Expand Down
7 changes: 1 addition & 6 deletions R/video_scores.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
#'
#' @export
#'
#' @examples
#' # Not run:
#' result <- video_scores("https://www.youtube.com/watch?v=dQw4w9WgXcQ", c("happy", "sad"), nframes = 200, face_selection = "left", cut = TRUE, start = 30, end = 90, uniform = TRUE, ffreq = 10, save_video = TRUE, save_frames = TRUE, save_dir = "output/", video_name = "analysis")
#'

video_scores <- function(video, classes, nframes=100,
face_selection = "largest", cut = FALSE, start = 0, end = 60, uniform = FALSE, ffreq = 15, save_video = FALSE, save_frames = FALSE, save_dir = "temp/", video_name = "temp"){
################################################################
Expand Down Expand Up @@ -76,7 +71,7 @@ video_scores <- function(video, classes, nframes=100,
file.remove(paste0(save_dir, video_name, ".mp4"))
}
if(!save_frames){
file.remove(list.files(save_dir, pattern = ".jpg"))
file.remove(paste0(save_dir, list.files(save_dir, pattern = ".jpg")))
}
return(result)
}
5 changes: 0 additions & 5 deletions man/image_scores.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions man/video_scores.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions temp.txt

This file was deleted.

Binary file removed temp/temp-frame-0.jpg
Binary file not shown.
Binary file removed temp/temp-frame-1.jpg
Binary file not shown.
Binary file removed temp/temp-frame-2.jpg
Binary file not shown.
Binary file removed temp/temp-frame-3.jpg
Binary file not shown.
Binary file removed temp/temp-frame-4.jpg
Binary file not shown.

0 comments on commit f11cca2

Please sign in to comment.