# フォルダ内のJPEG画像を処理 for IMAGE in "$INPUT_DIR"/*.JPG; do if [ -f "$IMAGE" ]; then # Pythonスクリプトを呼び出して処理 python3 detect_animals.py "$IMAGE" "$OUTPUT_DIR" "$COUNTER" COUNTER=$((COUNTER + 1)) fi done
echo "処理が完了しました。出力は $OUTPUT_DIR に保存されています。"
次に、Pythonのスクリプト detect_animals.py です。
import sys import os import cv2 import torch from pathlib import Path
AppImages require FUSE to run. You might still be able to extract the contents of this AppImage if you run it with the --appimage-extract option. See https://github.com/AppImage/AppImageKit/wiki/FUSE for more information
usb 5-2.4: new full-speed USB device number 8 using xhci_hcd usb 5-2.4: New USB device found, idVendor=1eaf, idProduct=0024, bcdDevice= 2.00 usb 5-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 5-2.4: Product: Maple usb 5-2.4: Manufacturer: LeafLabs input: LeafLabs Maple as /devices/pci0000:00/0000:00:08.1/0000:05:00.4/usb5/5-2/5-2.4/5-2.4:1.0/0003:1EAF:0024.0005/input/input29 hid-generic 0003:1EAF:0024.0005: input,hidraw4: USB HID v1.10 Mouse [LeafLabs Maple] on usb-0000:05:00.4-2.4/input0 usb 5-2.4: reset full-speed USB device number 8 using xhci_hcd
から、
usb 5-2.4: new full-speed USB device number 16 using xhci_hcd usb 5-2.4: New USB device found, idVendor=04d9, idProduct=1503, bcdDevice= 2.00 usb 5-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 5-2.4: Product: Mouse usb 5-2.4: Manufacturer: Generic input: Generic Mouse as /devices/pci0000:00/0000:00:08.1/0000:05:00.4/usb5/5-2/5-2.4/5-2.4:1.0/0003:04D9:1503.0009/input/input33 hid-generic 0003:04D9:1503.0009: input,hidraw4: USB HID v1.10 Mouse [Generic Mouse] on usb-0000:05:00.4-2.4/input0