ocean-data-factory-sweden / kso

Notebooks to upload/download marine footage, connect to a citizen science project, train machine learning models and publish marine biological observations.
GNU General Public License v3.0
4 stars 12 forks source link

Tutorial 4 issue with extracting frames manually #327

Closed Bergylta closed 7 months ago

Bergylta commented 7 months ago

🐛 Bug

I suspect this is another of the things that broke when updating to yolov8, I have tried with several configurations and can't remember if this is a error we have encountered before.

To Reproduce (REQUIRED)

Input: Movie folder: /mimer/NOBACKUP/groups/snic2021-6-9/project_movies/movies_Koster/Koster_films/compressed/

# Generate suitable frames for upload by modifying initial frames
pp.generate_custom_frames(
    input_path=input_folder.selected,
    output_path=output_folder.selected,
    skip_start=120,
    skip_end=120,
    num_frames=10,
    frames_skip=None,
)

Output:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
File /usr/src/app/kso-dev/kso_utils/project.py:973, in ProjectProcessor.generate_custom_frames.<locals>.on_button_clicked(b)
    969 def on_button_clicked(b):
    970     movie_files = sorted(
    971         [
    972             f
--> 973             for f in input_path.iterdir()
    974             if f.is_file()
    975             and f.suffix.lower() in [".mov", ".mp4", ".avi", ".mkv"]
    976         ]
    977     )
    979     results = g_utils.parallel_map(
    980         kso_widgets.extract_custom_frames,
    981         movie_files,
   (...)
    989         ),
    990     )
    991     if len(results) > 0:

AttributeError: 'str' object has no attribute 'iterdir'

Expected behavior

A clear and concise description of what you expected to happen.

Environment

If applicable, add screenshots to help explain your problem.

Additional context

jannesgg commented 7 months ago

Fixed. Do a git pull.