Tensorflow Object Detection Jupyter Notebook no detection - python
I tried to run the Jupyter Notebook example for the object detection of tensorflow (tutorial) but there are no detections. I printed the scores and it's seems to work but the results are very bad. Does anyone have an idea what I might have done wrong.
print(scores[0]):
[ 0.03587309 0.02224856 0.01864638 0.01096715 0.0100315
0.0065446
0.00633551 0.00534311 0.00495995 0.00410238 0.00362363 0.00339175
0.00308251 0.0030337 0.00293387 0.00277085 0.00269581 0.00266825
0.00263924 0.00263331 0.00258721 0.00240822 0.00225823 0.00186966
0.00184308 0.00180467 0.00177474 0.00173643 0.0017281 0.00171935
0.00171891 0.00170284 0.00163754 0.00162967 0.00160267 0.00156545
0.00153614 0.00140936 0.00132406 0.00131524 0.00131041 0.00129431
0.00125819 0.0012553 0.00122365 0.00119179 0.00115673 0.00115186
0.00112368 0.00107096 0.00105803 0.00104337 0.00102719 0.00102337
0.00100349 0.00097767 0.0009685 0.00092741 0.00088506 0.00087696
0.0008734 0.00084825 0.00084135 0.00083512 0.00083396 0.00082068
0.00080583 0.00078979 0.00078059 0.00077475 0.00075449 0.00074426
0.00074421 0.00070195 0.00068741 0.00068138 0.00067261 0.00067125
0.00067032 0.00066041 0.0006473 0.00064205 0.00061964 0.00061793
0.00060834 0.00060468 0.00059547 0.00059478 0.00059461 0.00059436
0.00059426 0.00059411 0.00059406 0.00059392 0.00059365 0.00059351
0.00059191 0.00058798 0.00058682 0.00058148]
[ 0.01044157 0.00982138 0.00942336 0.00846517 0.00613665 0.00398568
0.00357755 0.00300539 0.00255862 0.00236576 0.00232631 0.00220291
0.00185227 0.00163544 0.00159791 0.00145071 0.0014366 0.0014137
0.00122685 0.00118978 0.00108457 0.00104252 0.00099215 0.00096401
0.0008708 0.00084774 0.00080484 0.00078507 0.00078379 0.00076875
0.00072774 0.00071732 0.00071343 0.00070812 0.00069253 0.0006762
0.00067269 0.00059905 0.00059367 0.000588 0.00056114 0.0005504
0.00051472 0.00051055 0.00050973 0.00048484 0.00047297 0.00046204
0.00044787 0.00043259 0.00042987 0.00042673 0.00041978 0.00040494
0.00040087 0.00039576 0.00039059 0.00037274 0.00036828 0.00036417
0.0003612 0.00034645 0.00034479 0.00034078 0.00033771 0.00033605
0.0003333 0.0003304 0.0003294 0.00032325 0.00031787 0.00031773
0.00031748 0.00031741 0.00031732 0.00031729 0.00031724 0.00031722
0.00031717 0.00031708 0.00031702 0.00031579 0.00030416 0.00030222
0.00029739 0.00029726 0.00028289 0.00026527 0.00026325 0.00024584
0.00024221 0.00024156 0.0002391 0.00023335 0.00021617 0.0002001
0.00019127 0.00018342 0.00017271 0.00015507]
I'm running the example with tensorflow 1.4, python 3.5 and I tested the installation as suggested.
I had the same issue. I found in a post that you have to change:
MODEL_NAME = 'ssd_mobilenet_v1_coco_2017_11_08'
To:
MODEL_NAME = 'ssd_mobilenet_v1_coco_11_06_2017'
and it worked fine.
Original answer: https://stackoverflow.com/a/47332228/8954260
Related
Apache_beam--python --error: the following arguments are required: --output-path
When run my code in python or colaborator the following error, I intall all libraries from apache beam, somebody gives in one moment this error or knows about it.. usage: aaa_users_py.py [-h] [--runner RUNNER] [--streaming] [--resource_hint RESOURCE_HINTS] [--beam_services BEAM_SERVICES] [--type_check_strictness {ALL_REQUIRED,DEFAULT_TO_ANY}] [--type_check_additional TYPE_CHECK_ADDITIONAL] [--no_pipeline_type_check] [--runtime_type_check] [--performance_runtime_type_check] [--allow_non_deterministic_key_coders] [--allow_unsafe_triggers] [--no_direct_runner_use_stacked_bundle] [--direct_runner_bundle_repeat DIRECT_RUNNER_BUNDLE_REPEAT] [--direct_num_workers DIRECT_NUM_WORKERS] [--direct_running_mode {in_memory,multi_threading,multi_processing}] [--dataflow_endpoint DATAFLOW_ENDPOINT] [--project PROJECT] [--job_name JOB_NAME] [--staging_location STAGING_LOCATION] [--temp_location TEMP_LOCATION] [--region REGION] [--service_account_email SERVICE_ACCOUNT_EMAIL] [--no_auth] [--template_location TEMPLATE_LOCATION] [--label LABELS] [--update] [--transform_name_mapping TRANSFORM_NAME_MAPPING] [--enable_streaming_engine] [--dataflow_kms_key DATAFLOW_KMS_KEY] [--create_from_snapshot CREATE_FROM_SNAPSHOT] [--flexrs_goal {COST_OPTIMIZED,SPEED_OPTIMIZED}] [--dataflow_service_option DATAFLOW_SERVICE_OPTIONS] [--enable_hot_key_logging] [--enable_artifact_caching] [--impersonate_service_account IMPERSONATE_SERVICE_ACCOUNT] [--hdfs_host HDFS_HOST] [--hdfs_port HDFS_PORT] [--hdfs_user HDFS_USER] [--hdfs_full_urls] [--num_workers NUM_WORKERS] [--max_num_workers MAX_NUM_WORKERS] [--autoscaling_algorithm {NONE,THROUGHPUT_BASED}] [--worker_machine_type MACHINE_TYPE] [--disk_size_gb DISK_SIZE_GB] [--worker_disk_type DISK_TYPE] [--worker_region WORKER_REGION] [--worker_zone WORKER_ZONE] [--zone ZONE] [--network NETWORK] [--subnetwork SUBNETWORK] [--worker_harness_container_image WORKER_HARNESS_CONTAINER_IMAGE] [--sdk_container_image SDK_CONTAINER_IMAGE] [--sdk_harness_container_image_overrides SDK_HARNESS_CONTAINER_IMAGE_OVERRIDES] [--use_public_ips] [--no_use_public_ips] [--min_cpu_platform MIN_CPU_PLATFORM] [--dataflow_worker_jar DATAFLOW_WORKER_JAR] [--dataflow_job_file DATAFLOW_JOB_FILE] [--experiment EXPERIMENTS] [--number_of_worker_harness_threads NUMBER_OF_WORKER_HARNESS_THREADS] [--profile_cpu] [--profile_memory] [--profile_location PROFILE_LOCATION] [--profile_sample_rate PROFILE_SAMPLE_RATE] [--requirements_file REQUIREMENTS_FILE] [--requirements_cache REQUIREMENTS_CACHE] [--requirements_cache_only_sources] [--setup_file SETUP_FILE] [--beam_plugin BEAM_PLUGINS] [--pickle_library {cloudpickle,default,dill}] [--save_main_session] [--sdk_location SDK_LOCATION] [--extra_package EXTRA_PACKAGES] [--prebuild_sdk_container_engine PREBUILD_SDK_CONTAINER_ENGINE] [--prebuild_sdk_container_base_image PREBUILD_SDK_CONTAINER_BASE_IMAGE] [--cloud_build_machine_type CLOUD_BUILD_MACHINE_TYPE] [--docker_registry_push_url DOCKER_REGISTRY_PUSH_URL] [--job_endpoint JOB_ENDPOINT] [--artifact_endpoint ARTIFACT_ENDPOINT] [--job_server_timeout JOB_SERVER_TIMEOUT] [--environment_type ENVIRONMENT_TYPE] [--environment_config ENVIRONMENT_CONFIG] [--environment_option ENVIRONMENT_OPTIONS] [--sdk_worker_parallelism SDK_WORKER_PARALLELISM] [--environment_cache_millis ENVIRONMENT_CACHE_MILLIS] [--output_executable_path OUTPUT_EXECUTABLE_PATH] [--artifacts_dir ARTIFACTS_DIR] [--job_port JOB_PORT] [--artifact_port ARTIFACT_PORT] [--expansion_port EXPANSION_PORT] [--job_server_java_launcher JOB_SERVER_JAVA_LAUNCHER] [--job_server_jvm_properties JOB_SERVER_JVM_PROPERTIES] [--flink_master FLINK_MASTER] [--flink_version {1.12,1.13,1.14}] [--flink_job_server_jar FLINK_JOB_SERVER_JAR] [--flink_submit_uber_jar] [--spark_master_url SPARK_MASTER_URL] [--spark_job_server_jar SPARK_JOB_SERVER_JAR] [--spark_submit_uber_jar] [--spark_rest_url SPARK_REST_URL] [--spark_version {2,3}] [--on_success_matcher ON_SUCCESS_MATCHER] [--dry_run DRY_RUN] [--wait_until_finish_duration WAIT_UNTIL_FINISH_DURATION] [--pubsub_root_url PUBSUBROOTURL] [--s3_access_key_id S3_ACCESS_KEY_ID] [--s3_secret_access_key S3_SECRET_ACCESS_KEY] [--s3_session_token S3_SESSION_TOKEN] [--s3_endpoint_url S3_ENDPOINT_URL] [--s3_region_name S3_REGION_NAME] [--s3_api_version S3_API_VERSION] [--s3_verify S3_VERIFY] [--s3_disable_ssl] [--input-file INPUT_FILE] --output-path OUTPUT_PATH aaa_users_py.py: error: the following arguments are required: --output-path
It probably means that the pipeline built in this Python script has a required customized pipeline option that includes a field named --output-path. Think it as a "template" to spawn jobs by ETL data from the --input-path to the --output-path, you have to tell the pipeline where to read and write before submitting it as a job.
VSCode Jupyter Interactive Window - show long output
The VSCode Interactive window for Jupyter truncates long output: import os dir(os) ['CLD_CONTINUED', 'CLD_DUMPED', 'CLD_EXITED', 'CLD_TRAPPED', 'DirEntry', 'EX_CANTCREAT', 'EX_CONFIG', 'EX_DATAERR', 'EX_IOERR', 'EX_NOHOST', 'EX_NOINPUT', 'EX_NOPERM', 'EX_NOUSER', 'EX_OK', 'EX_OSERR', 'EX_OSFILE', 'EX_PROTOCOL', 'EX_SOFTWARE', 'EX_TEMPFAIL', 'EX_UNAVAILABLE', 'EX_USAGE', 'F_LOCK', 'F_OK', 'F_TEST', 'F_TLOCK', show more (open the raw output data in a text editor) ... 'waitid', 'waitid_result', 'waitpid', 'walk', 'write', 'writev'] This is nice functionality as it stops commands that generate a lot of output from overwhelming the Interactive window. How can I see the entire output? I can click on the "show more" link, but the output is in a JSON format which is difficult to read. [ { "metadata": { "outputType": "execute_result", "executionCount": 8, "metadata": {} }, "outputItems": [ { "mimeType": "text/plain", "data": "['CLD_CONTINUED',\n 'CLD_DUMPED',\n 'CLD_EXITED',\n 'CLD_TRAPPED',\n 'DirEntry',\n 'EX_CANTCREAT',\n 'EX_CONFIG',\n 'EX_DATAERR',\n 'EX_IOERR',\n 'EX_NOHOST',\n 'EX_NOINPUT',\n 'EX_NOPERM',\n 'EX_NOUSER',\n 'EX_OK',\n 'EX_OSERR',\n 'EX_OSFILE',\n 'EX_PROTOCOL',\n 'EX_SOFTWARE',\n 'EX_TEMPFAIL',\n 'EX_UNAVAILABLE',\n 'EX_USAGE',\n 'F_LOCK',\n 'F_OK',\n 'F_TEST',\n 'F_TLOCK',\n 'F_ULOCK',\n 'GRND_NONBLOCK',\n 'GRND_RANDOM',\n 'MutableMapping',\n 'NGROUPS_MAX',\n 'O_ACCMODE',\n 'O_APPEND',\n 'O_ASYNC',\n 'O_CLOEXEC',\n 'O_CREAT',\n 'O_DIRECT',\n 'O_DIRECTORY',\n 'O_DSYNC',\n 'O_EXCL',\n 'O_LARGEFILE',\n 'O_NDELAY',\n 'O_NOATIME',\n 'O_NOCTTY',\n 'O_NOFOLLOW',\n 'O_NONBLOCK',\n 'O_PATH',\n 'O_RDONLY',\n 'O_RDWR',\n 'O_RSYNC',\n 'O_SYNC',\n 'O_TMPFILE',\n 'O_TRUNC',\n 'O_WRONLY',\n 'POSIX_FADV_DONTNEED',\n 'POSIX_FADV_NOREUSE',\n 'POSIX_FADV_NORMAL',\n 'POSIX_FADV_RANDOM',\n 'POSIX_FADV_SEQUENTIAL',\n 'POSIX_FADV_WILLNEED',\n 'PRIO_PGRP',\n 'PRIO_PROCESS',\n 'PRIO_USER',\n 'P_ALL',\n 'P_NOWAIT',\n 'P_NOWAITO',\n 'P_PGID',\n 'P_PID',\n 'P_WAIT',\n 'PathLike',\n 'RTLD_DEEPBIND',\n 'RTLD_GLOBAL',\n 'RTLD_LAZY',\n 'RTLD_LOCAL',\n 'RTLD_NODELETE',\n 'RTLD_NOLOAD',\n 'RTLD_NOW',\n 'R_OK',\n 'SCHED_BATCH',\n 'SCHED_FIFO',\n 'SCHED_IDLE',\n 'SCHED_OTHER',\n 'SCHED_RESET_ON_FORK',\n 'SCHED_RR',\n 'SEEK_CUR',\n 'SEEK_DATA',\n 'SEEK_END',\n 'SEEK_HOLE',\n 'SEEK_SET',\n 'ST_APPEND',\n 'ST_MANDLOCK',\n 'ST_NOATIME',\n 'ST_NODEV',\n 'ST_NODIRATIME',\n 'ST_NOEXEC',\n 'ST_NOSUID',\n 'ST_RDONLY',\n 'ST_RELATIME',\n 'ST_SYNCHRONOUS',\n 'ST_WRITE',\n 'TMP_MAX',\n 'WCONTINUED',\n 'WCOREDUMP',\n 'WEXITED',\n 'WEXITSTATUS',\n 'WIFCONTINUED',\n 'WIFEXITED',\n 'WIFSIGNALED',\n 'WIFSTOPPED',\n 'WNOHANG',\n 'WNOWAIT',\n 'WSTOPPED',\n 'WSTOPSIG',\n 'WTERMSIG',\n 'WUNTRACED',\n 'W_OK',\n 'XATTR_CREATE',\n 'XATTR_REPLACE',\n 'XATTR_SIZE_MAX',\n 'X_OK',\n '_Environ',\n '__all__',\n '__builtins__',\n '__cached__',\n '__doc__',\n '__file__',\n '__loader__',\n '__name__',\n '__package__',\n '__spec__',\n '_execvpe',\n '_exists',\n '_exit',\n '_fspath',\n '_fwalk',\n '_get_exports_list',\n '_putenv',\n '_spawnvef',\n '_unsetenv',\n '_wrap_close',\n 'abc',\n 'abort',\n 'access',\n 'altsep',\n 'chdir',\n 'chmod',\n 'chown',\n 'chroot',\n 'close',\n 'closerange',\n 'confstr',\n 'confstr_names',\n 'cpu_count',\n 'ctermid',\n 'curdir',\n 'defpath',\n 'device_encoding',\n 'devnull',\n 'dup',\n 'dup2',\n 'environ',\n 'environb',\n 'errno',\n 'error',\n 'execl',\n 'execle',\n 'execlp',\n 'execlpe',\n 'execv',\n 'execve',\n 'execvp',\n 'execvpe',\n 'extsep',\n 'fchdir',\n 'fchmod',\n 'fchown',\n 'fdatasync',\n 'fdopen',\n 'fork',\n 'forkpty',\n 'fpathconf',\n 'fsdecode',\n 'fsencode',\n 'fspath',\n 'fstat',\n 'fstatvfs',\n 'fsync',\n 'ftruncate',\n 'fwalk',\n 'get_blocking',\n 'get_exec_path',\n 'get_inheritable',\n 'get_terminal_size',\n 'getcwd',\n 'getcwdb',\n 'getegid',\n 'getenv',\n 'getenvb',\n 'geteuid',\n 'getgid',\n 'getgrouplist',\n 'getgroups',\n 'getloadavg',\n 'getlogin',\n 'getpgid',\n 'getpgrp',\n 'getpid',\n 'getppid',\n 'getpriority',\n 'getrandom',\n 'getresgid',\n 'getresuid',\n 'getsid',\n 'getuid',\n 'getxattr',\n 'initgroups',\n 'isatty',\n 'kill',\n 'killpg',\n 'lchown',\n 'linesep',\n 'link',\n 'listdir',\n 'listxattr',\n 'lockf',\n 'lseek',\n 'lstat',\n 'major',\n 'makedev',\n 'makedirs',\n 'minor',\n 'mkdir',\n 'mkfifo',\n 'mknod',\n 'name',\n 'nice',\n 'open',\n 'openpty',\n 'pardir',\n 'path',\n 'pathconf',\n 'pathconf_names',\n 'pathsep',\n 'pipe',\n 'pipe2',\n 'popen',\n 'posix_fadvise',\n 'posix_fallocate',\n 'pread',\n 'putenv',\n 'pwrite',\n 'read',\n 'readlink',\n 'readv',\n 'remove',\n 'removedirs',\n 'removexattr',\n 'rename',\n 'renames',\n 'replace',\n 'rmdir',\n 'scandir',\n 'sched_get_priority_max',\n 'sched_get_priority_min',\n 'sched_getaffinity',\n 'sched_getparam',\n 'sched_getscheduler',\n 'sched_param',\n 'sched_rr_get_interval',\n 'sched_setaffinity',\n 'sched_setparam',\n 'sched_setscheduler',\n 'sched_yield',\n 'sendfile',\n 'sep',\n 'set_blocking',\n 'set_inheritable',\n 'setegid',\n 'seteuid',\n 'setgid',\n 'setgroups',\n 'setpgid',\n 'setpgrp',\n 'setpriority',\n 'setregid',\n 'setresgid',\n 'setresuid',\n 'setreuid',\n 'setsid',\n 'setuid',\n 'setxattr',\n 'spawnl',\n 'spawnle',\n 'spawnlp',\n 'spawnlpe',\n 'spawnv',\n 'spawnve',\n 'spawnvp',\n 'spawnvpe',\n 'st',\n 'stat',\n 'stat_float_times',\n 'stat_result',\n 'statvfs',\n 'statvfs_result',\n 'strerror',\n 'supports_bytes_environ',\n 'supports_dir_fd',\n 'supports_effective_ids',\n 'supports_fd',\n 'supports_follow_symlinks',\n 'symlink',\n 'sync',\n 'sys',\n 'sysconf',\n 'sysconf_names',\n 'system',\n 'tcgetpgrp',\n 'tcsetpgrp',\n 'terminal_size',\n 'times',\n 'times_result',\n 'truncate',\n 'ttyname',\n 'umask',\n 'uname',\n 'uname_result',\n 'unlink',\n 'unsetenv',\n 'urandom',\n 'utime',\n 'wait',\n 'wait3',\n 'wait4',\n 'waitid',\n 'waitid_result',\n 'waitpid',\n 'walk',\n 'write',\n 'writev']" } ] } ] I can take the raw output and massage it in a text editor or other tool. This is time consuming, so I'm looking for an approach that is built into VSCode.
This is a bug that has been reported to the VS Code team and has a fix in already. The fix is in VS Code - Insiders (you can install that side by side with stable) to check. The fix should be in stable VS Code in the next full release: https://github.com/microsoft/vscode/issues/130512
Installing the JSON formatter (or other similar extension) should work to prettify it in VSCode itself.
Error while loading model weights in pytorch
My model was in a .pth file and for loading the model i wrote this code. model = torch.jit.load('/content/drive/MyDrive/fod.pth') torch.save(model.state_dict(), 'weights.pt') u2net = U2NETP() u2net.eval() u2net.load_state_dict(torch.load('/content/weights.pt'), strict = False) U2NETP is the network architecture, but the problem here is that I am getting an error which goes like this _IncompatibleKeys(missing_keys=['stage1.rebnconvin.bn_s1.running_mean', 'stage1.rebnconvin.bn_s1.running_var', 'stage1.rebnconv1.bn_s1.running_mean', 'stage1.rebnconv1.bn_s1.running_var', 'stage1.rebnconv2.bn_s1.running_mean', 'stage1.rebnconv2.bn_s1.running_var', 'stage1.rebnconv3.bn_s1.running_mean', 'stage1.rebnconv3.bn_s1.running_var', 'stage1.rebnconv4.bn_s1.running_mean', 'stage1.rebnconv4.bn_s1.running_var', 'stage1.rebnconv5.bn_s1.running_mean', 'stage1.rebnconv5.bn_s1.running_var', 'stage1.rebnconv6.bn_s1.running_mean', 'stage1.rebnconv6.bn_s1.running_var', 'stage1.rebnconv7.bn_s1.running_mean', 'stage1.rebnconv7.bn_s1.running_var', 'stage1.rebnconv6d.bn_s1.running_mean', 'stage1.rebnconv6d.bn_s1.running_var', 'stage1.rebnconv5d.bn_s1.running_mean', 'stage1.rebnconv5d.bn_s1.running_var', 'stage1.rebnconv4d.bn_s1.running_mean', 'stage1.rebnconv4d.bn_s1.running_var', 'stage1.rebnconv3d.bn_s1.running_mean', 'stage1.rebnconv3d.bn_s1.running_var', 'stage1.rebnconv2d.bn_s1.running_mean', 'stage1.rebnconv2d.bn_s1.running_var', 'stage1.rebnconv1d.bn_s1.running_mean', 'stage1.rebnconv1d.bn_s1.running_var', 'stage2.rebnconvin.bn_s1.running_mean', 'stage2.rebnconvin.bn_s1.running_var', 'stage2.rebnconv1.bn_s1.running_mean', 'stage2.rebnconv1.bn_s1.running_var', 'stage2.rebnconv2.bn_s1.running_mean', 'stage2.rebnconv2.bn_s1.running_var', 'stage2.rebnconv3.bn_s1.running_mean', 'stage2.rebnconv3.bn_s1.running_var', 'stage2.rebnconv4.bn_s1.running_mean', 'stage2.rebnconv4.bn_s1.running_var', 'stage2.rebnconv5.bn_s1.running_mean', 'stage2.rebnconv5.bn_s1.running_var', 'stage2.rebnconv6.bn_s1.running_mean', 'stage2.rebnconv6.bn_s1.running_var', 'stage2.rebnconv5d.bn_s1.running_mean', 'stage2.rebnconv5d.bn_s1.running_var', 'stage2.rebnconv4d.bn_s1.running_mean', 'stage2.rebnconv4d.bn_s1.running_var', 'stage2.rebnconv3d.bn_s1.running_mean', 'stage2.rebnconv3d.bn_s1.running_var', 'stage2.rebnconv2d.bn_s1.running_mean', 'stage2.rebnconv2d.bn_s1.running_var', 'stage2.rebnconv1d.bn_s1.running_mean', 'stage2.rebnconv1d.bn_s1.running_var', 'stage3.rebnconvin.bn_s1.running_mean', 'stage3.rebnconvin.bn_s1.running_var', 'stage3.rebnconv1.bn_s1.running_mean', 'stage3.rebnconv1.bn_s1.running_var', 'stage3.rebnconv2.bn_s1.running_mean', 'stage3.rebnconv2.bn_s1.running_var', 'stage3.rebnconv3.bn_s1.running_mean', 'stage3.rebnconv3.bn_s1.running_var', 'stage3.rebnconv4.bn_s1.running_mean', 'stage3.rebnconv4.bn_s1.running_var', 'stage3.rebnconv5.bn_s1.running_mean', 'stage3.rebnconv5.bn_s1.running_var', 'stage3.rebnconv4d.bn_s1.running_mean', 'stage3.rebnconv4d.bn_s1.running_var', 'stage3.rebnconv3d.bn_s1.running_mean', 'stage3.rebnconv3d.bn_s1.running_var', 'stage3.rebnconv2d.bn_s1.running_mean', 'stage3.rebnconv2d.bn_s1.running_var', 'stage3.rebnconv1d.bn_s1.running_mean', 'stage3.rebnconv1d.bn_s1.running_var', 'stage4.rebnconvin.bn_s1.running_mean', 'stage4.rebnconvin.bn_s1.running_var', 'stage4.rebnconv1.bn_s1.running_mean', 'stage4.rebnconv1.bn_s1.running_var', 'stage4.rebnconv2.bn_s1.running_mean', 'stage4.rebnconv2.bn_s1.running_var', 'stage4.rebnconv3.bn_s1.running_mean', 'stage4.rebnconv3.bn_s1.running_var', 'stage4.rebnconv4.bn_s1.running_mean', 'stage4.rebnconv4.bn_s1.running_var', 'stage4.rebnconv3d.bn_s1.running_mean', 'stage4.rebnconv3d.bn_s1.running_var', 'stage4.rebnconv2d.bn_s1.running_mean', 'stage4.rebnconv2d.bn_s1.running_var', 'stage4.rebnconv1d.bn_s1.running_mean', 'stage4.rebnconv1d.bn_s1.running_var', 'stage5.rebnconvin.bn_s1.running_mean', 'stage5.rebnconvin.bn_s1.running_var', 'stage5.rebnconv1.bn_s1.running_mean', 'stage5.rebnconv1.bn_s1.running_var', 'stage5.rebnconv2.bn_s1.running_mean', 'stage5.rebnconv2.bn_s1.running_var', 'stage5.rebnconv3.bn_s1.running_mean', 'stage5.rebnconv3.bn_s1.running_var', 'stage5.rebnconv4.bn_s1.running_mean', 'stage5.rebnconv4.bn_s1.running_var', 'stage5.rebnconv3d.bn_s1.running_mean', 'stage5.rebnconv3d.bn_s1.running_var', 'stage5.rebnconv2d.bn_s1.running_mean', 'stage5.rebnconv2d.bn_s1.running_var', 'stage5.rebnconv1d.bn_s1.running_mean', 'stage5.rebnconv1d.bn_s1.running_var', 'stage6.rebnconvin.bn_s1.running_mean', 'stage6.rebnconvin.bn_s1.running_var', 'stage6.rebnconv1.bn_s1.running_mean', 'stage6.rebnconv1.bn_s1.running_var', 'stage6.rebnconv2.bn_s1.running_mean', 'stage6.rebnconv2.bn_s1.running_var', 'stage6.rebnconv3.bn_s1.running_mean', 'stage6.rebnconv3.bn_s1.running_var', 'stage6.rebnconv4.bn_s1.running_mean', 'stage6.rebnconv4.bn_s1.running_var', 'stage6.rebnconv3d.bn_s1.running_mean', 'stage6.rebnconv3d.bn_s1.running_var', 'stage6.rebnconv2d.bn_s1.running_mean', 'stage6.rebnconv2d.bn_s1.running_var', 'stage6.rebnconv1d.bn_s1.running_mean', 'stage6.rebnconv1d.bn_s1.running_var', 'stage5d.rebnconvin.bn_s1.running_mean', 'stage5d.rebnconvin.bn_s1.running_var', 'stage5d.rebnconv1.bn_s1.running_mean', 'stage5d.rebnconv1.bn_s1.running_var', 'stage5d.rebnconv2.bn_s1.running_mean', 'stage5d.rebnconv2.bn_s1.running_var', 'stage5d.rebnconv3.bn_s1.running_mean', 'stage5d.rebnconv3.bn_s1.running_var', 'stage5d.rebnconv4.bn_s1.running_mean', 'stage5d.rebnconv4.bn_s1.running_var', 'stage5d.rebnconv3d.bn_s1.running_mean', 'stage5d.rebnconv3d.bn_s1.running_var', 'stage5d.rebnconv2d.bn_s1.running_mean', 'stage5d.rebnconv2d.bn_s1.running_var', 'stage5d.rebnconv1d.bn_s1.running_mean', 'stage5d.rebnconv1d.bn_s1.running_var', 'stage4d.rebnconvin.bn_s1.running_mean', 'stage4d.rebnconvin.bn_s1.running_var', 'stage4d.rebnconv1.bn_s1.running_mean', 'stage4d.rebnconv1.bn_s1.running_var', 'stage4d.rebnconv2.bn_s1.running_mean', 'stage4d.rebnconv2.bn_s1.running_var', 'stage4d.rebnconv3.bn_s1.running_mean', 'stage4d.rebnconv3.bn_s1.running_var', 'stage4d.rebnconv4.bn_s1.running_mean', 'stage4d.rebnconv4.bn_s1.running_var', 'stage4d.rebnconv3d.bn_s1.running_mean', 'stage4d.rebnconv3d.bn_s1.running_var', 'stage4d.rebnconv2d.bn_s1.running_mean', 'stage4d.rebnconv2d.bn_s1.running_var', 'stage4d.rebnconv1d.bn_s1.running_mean', 'stage4d.rebnconv1d.bn_s1.running_var', 'stage3d.rebnconvin.bn_s1.running_mean', 'stage3d.rebnconvin.bn_s1.running_var', 'stage3d.rebnconv1.bn_s1.running_mean', 'stage3d.rebnconv1.bn_s1.running_var', 'stage3d.rebnconv2.bn_s1.running_mean', 'stage3d.rebnconv2.bn_s1.running_var', 'stage3d.rebnconv3.bn_s1.running_mean', 'stage3d.rebnconv3.bn_s1.running_var', 'stage3d.rebnconv4.bn_s1.running_mean', 'stage3d.rebnconv4.bn_s1.running_var', 'stage3d.rebnconv5.bn_s1.running_mean', 'stage3d.rebnconv5.bn_s1.running_var', 'stage3d.rebnconv4d.bn_s1.running_mean', 'stage3d.rebnconv4d.bn_s1.running_var', 'stage3d.rebnconv3d.bn_s1.running_mean', 'stage3d.rebnconv3d.bn_s1.running_var', 'stage3d.rebnconv2d.bn_s1.running_mean', 'stage3d.rebnconv2d.bn_s1.running_var', 'stage3d.rebnconv1d.bn_s1.running_mean', 'stage3d.rebnconv1d.bn_s1.running_var', 'stage2d.rebnconvin.bn_s1.running_mean', 'stage2d.rebnconvin.bn_s1.running_var', 'stage2d.rebnconv1.bn_s1.running_mean', 'stage2d.rebnconv1.bn_s1.running_var', 'stage2d.rebnconv2.bn_s1.running_mean', 'stage2d.rebnconv2.bn_s1.running_var', 'stage2d.rebnconv3.bn_s1.running_mean', 'stage2d.rebnconv3.bn_s1.running_var', 'stage2d.rebnconv4.bn_s1.running_mean', 'stage2d.rebnconv4.bn_s1.running_var', 'stage2d.rebnconv5.bn_s1.running_mean', 'stage2d.rebnconv5.bn_s1.running_var', 'stage2d.rebnconv6.bn_s1.running_mean', 'stage2d.rebnconv6.bn_s1.running_var', 'stage2d.rebnconv5d.bn_s1.running_mean', 'stage2d.rebnconv5d.bn_s1.running_var', 'stage2d.rebnconv4d.bn_s1.running_mean', 'stage2d.rebnconv4d.bn_s1.running_var', 'stage2d.rebnconv3d.bn_s1.running_mean', 'stage2d.rebnconv3d.bn_s1.running_var', 'stage2d.rebnconv2d.bn_s1.running_mean', 'stage2d.rebnconv2d.bn_s1.running_var', 'stage2d.rebnconv1d.bn_s1.running_mean', 'stage2d.rebnconv1d.bn_s1.running_var', 'stage1d.rebnconvin.bn_s1.running_mean', 'stage1d.rebnconvin.bn_s1.running_var', 'stage1d.rebnconv1.bn_s1.running_mean', 'stage1d.rebnconv1.bn_s1.running_var', 'stage1d.rebnconv2.bn_s1.running_mean', 'stage1d.rebnconv2.bn_s1.running_var', 'stage1d.rebnconv3.bn_s1.running_mean', 'stage1d.rebnconv3.bn_s1.running_var', 'stage1d.rebnconv4.bn_s1.running_mean', 'stage1d.rebnconv4.bn_s1.running_var', 'stage1d.rebnconv5.bn_s1.running_mean', 'stage1d.rebnconv5.bn_s1.running_var', 'stage1d.rebnconv6.bn_s1.running_mean', 'stage1d.rebnconv6.bn_s1.running_var', 'stage1d.rebnconv7.bn_s1.running_mean', 'stage1d.rebnconv7.bn_s1.running_var', 'stage1d.rebnconv6d.bn_s1.running_mean', 'stage1d.rebnconv6d.bn_s1.running_var', 'stage1d.rebnconv5d.bn_s1.running_mean', 'stage1d.rebnconv5d.bn_s1.running_var', 'stage1d.rebnconv4d.bn_s1.running_mean', 'stage1d.rebnconv4d.bn_s1.running_var', 'stage1d.rebnconv3d.bn_s1.running_mean', 'stage1d.rebnconv3d.bn_s1.running_var', 'stage1d.rebnconv2d.bn_s1.running_mean', 'stage1d.rebnconv2d.bn_s1.running_var', 'stage1d.rebnconv1d.bn_s1.running_mean', 'stage1d.rebnconv1d.bn_s1.running_var'], unexpected_keys=[]) for param_tensor in sd: print(param_tensor, "\t", model.state_dict()[param_tensor].size()) I used this code for printing the weights. Seems like it contains weights and bias keys but not running mean/ variance
How to access the embeddings using tensorflow hub.module?
I am using the following code to access the embeddings using TF Hub Universal Sentence encoder. import tensorflow as tf import tensorflow_hub as hub model = hub.load("https://tfhub.dev/google/universal-sentence-encoder/4") def embed(input): return model(input) messages = ["There is no hard limit on how long the paragraph is. Roughly, the longer the more 'diluted' the embedding will be."] message_embeddings = embed(messages) How can I access the actual vectors now?
Actual Embedding Vectors can be accessed from the Variable, message_embeddings. message_embeddings is a Vector of shape=(1, 512), meaning, the Dimensionality of the Vector returned by USE-4 is 512. In other words, Every Sentence is encoded into 512 Columned Vector. Output of the code, print(message_embeddings) is tf.Tensor( [[-0.00366504 -0.00703163 -0.0061244 0.02026021 -0.09436475 0.00027828 0.05004153 -0.01591516 0.088241 0.07551358 -0.01868021 0.04386544 0.00105771 0.03730893 -0.05554571 0.02852311 0.01709696 0.08152976 -0.03092775 0.00683713 -0.08059237 0.042355 -0.07580714 -0.00443942 -0.03430099 0.03240041 -0.05212452 -0.04247908 -0.05534476 -0.02328587 -0.0438301 -0.03972115 0.01639873 0.00163302 0.07708091 -0.02310511 0.01288455 0.04831124 0.0089498 -0.02632253 -0.01840279 0.02118563 0.03758964 0.08740229 0.02880297 -0.00486817 0.0115555 -0.00451289 -0.00162866 0.01446948 0.00189139 -0.07941346 -0.0216493 -0.02580371 -0.00930381 -0.00526039 -0.01272183 0.02215818 0.04742621 0.02226813 0.0110765 -0.01790449 0.01739751 -0.08388933 0.05826297 -0.05230762 -0.07484917 0.06905693 0.01646299 0.00850342 -0.0022191 -0.07555264 0.01601691 0.06028103 0.00524664 0.03776945 -0.05246941 0.03556651 0.06253887 -0.04647287 -0.03415112 -0.03473583 0.04833042 -0.01264609 0.01788526 -0.07143527 -0.02432756 0.04081429 -0.0524265 -0.05402376 -0.02753968 0.06558003 0.01936845 -0.08112626 0.0157347 0.05620547 -0.06219236 -0.03654391 0.03936478 -0.01247254 -0.03957544 0.07394353 -0.06131149 -0.0550663 0.08301188 -0.01699291 0.03726438 0.00248359 -0.00569713 0.04109528 -0.05154289 0.05428214 -0.06594346 0.06009263 0.02753788 0.01492724 -0.01422153 0.02779302 0.02881143 -0.01985389 0.05809831 -0.02661227 -0.06907296 0.01192496 -0.03630216 0.03146286 -0.02979902 0.05192203 -0.0479207 0.03564131 0.05351846 0.02681697 0.02597373 -0.03392426 -0.05286925 -0.05110073 0.01331552 -0.00612995 -0.04932296 -0.0185418 -0.0841584 0.02415963 -0.01051812 0.05603031 -0.0083728 -0.05966095 0.0321536 -0.03968453 0.03799454 -0.05958865 -0.07585841 0.04390398 -0.03674331 0.01918785 0.03446485 -0.04106916 -0.05183128 0.02947152 -0.03531763 0.03698466 0.06261521 -0.00646621 0.01130813 -0.02275244 -0.04280937 0.01955702 -0.03919312 0.00476116 0.01887495 -0.00195181 -0.02401051 -0.06942239 -0.06978329 0.06458326 0.00362934 0.03588834 0.04921037 -0.03195003 0.02806171 -0.0193333 0.00994556 -0.02342404 0.10165592 -0.02853323 0.04147425 0.00914851 0.00497671 0.00073764 -0.00318258 0.03595887 -0.01817959 0.01496308 -0.03551586 0.02536247 -0.07170779 -0.03153825 -0.04042004 -0.01769615 0.00958568 0.00038516 0.00799816 0.04089458 0.02171035 -0.08852603 -0.06747856 0.05664572 -0.06597329 0.02299296 0.03397151 -0.03845559 0.00395073 0.00314357 0.01119022 0.05957965 -0.05583638 0.02908287 0.0112076 0.07695369 -0.03935304 -0.02383705 -0.04208985 -0.00359387 0.06851663 -0.05395376 -0.00246254 -0.01888378 -0.01391678 -0.07573339 0.05811501 0.02059502 -0.00418438 -0.01210096 -0.06286791 -0.07645103 -0.02463043 -0.03153505 0.05593796 -0.02202086 -0.00274707 0.04458077 -0.06263509 0.06126784 -0.04235342 0.00322403 0.02189728 -0.06388599 -0.03919036 -0.00010863 0.02531325 0.02581233 -0.01304512 -0.03001025 -0.02754986 0.0531372 -0.02369525 -0.04376267 0.0641819 0.09532097 -0.06730784 0.04478338 0.02004733 0.05244097 -0.01885018 -0.06137342 -0.08407518 -0.00084469 -0.02145135 -0.0091182 -0.06907462 0.06986497 0.0600312 -0.04390564 -0.00131028 0.06390417 0.03533437 0.03813365 0.04030495 -0.01402102 -0.06857175 -0.06571147 0.01421791 -0.0381003 -0.04138157 0.05040992 -0.05724671 0.01490439 -0.07905842 -0.03806996 -0.01071311 -0.01229521 -0.00771822 -0.03641455 -0.04578875 0.00925799 0.0403841 0.00132017 0.031641 0.01162737 0.0101506 -0.01761867 0.0579349 0.03595775 -0.01147426 -0.01525036 0.05006553 0.03747585 -0.05307707 -0.08915938 0.02942844 -0.05546442 -0.0128964 0.04225868 -0.01534053 -0.04580414 0.01088955 -0.03184818 0.02326705 -0.08861458 -0.07253686 -0.02572111 -0.03711193 0.0474383 -0.05628109 -0.01391787 0.00941848 -0.06177152 -0.06071901 -0.0092127 -0.10220838 -0.01376523 0.03162379 0.03983926 0.00640659 -0.00418033 -0.01612685 0.01891562 -0.04313575 0.01139805 -0.00378637 0.08349139 0.08300766 -0.0494319 -0.03658734 0.00325003 -0.05251636 -0.04457545 -0.079386 -0.05799922 -0.01254137 0.02311826 -0.00766293 -0.06729192 -0.03971054 -0.0663051 0.08720677 0.04582898 -0.08557201 -0.01054355 -0.02762848 0.06243869 -0.08848279 0.02289506 0.05723204 -0.01221769 -0.0393519 -0.00582338 0.02841124 -0.03293297 -0.03143778 -0.00352248 0.0073043 0.01209227 -0.00148794 0.03695554 0.03136331 -0.03311655 -0.0221175 -0.07959055 -0.04138357 -0.00950083 -0.01173625 0.01499144 -0.0121095 0.00823302 0.07642982 0.05198056 0.05955188 0.03240911 0.09211077 -0.05317325 -0.06024589 0.00489183 0.04719653 0.02498623 0.03750401 -0.02352423 0.05042319 -0.01633615 -0.02236294 0.04443104 0.02694818 0.00881322 0.02469178 -0.06206469 -0.00215397 -0.02641553 0.00405129 -0.07184313 -0.02841844 0.0309756 0.02459977 -0.03155032 0.01407542 0.00524732 -0.01893367 0.0102607 -0.00333736 0.02885202 -0.03275619 -0.08507563 0.02076722 -0.02471628 -0.00449985 0.0004644 -0.0923043 0.02101186 0.0352884 0.03790538 -0.00372656 0.06751391 0.02638355 0.01678842 0.03843728 0.10451197 -0.06375936 -0.05324562 0.03276567 -0.01112294 -0.0082361 -0.01735083 -0.03767544 -0.04266915 -0.04767371 0.07573947 -0.01247379 -0.01048137 -0.02308911 -0.01484709 -0.00733855 0.06788232 -0.08163249 -0.01530467 -0.01805264 -0.07910046 -0.06530869 0.07402557 0.06713054 -0.01659747 -0.00980262 0.05586078 0.03396358 -0.06102567 -0.06640005 0.02269907 0.03265672 -0.01353668 -0.08313932 -0.02356159 -0.03383274 0.05942128 -0.08610516 -0.08445066 -0.01306568 -0.05279852 0.00986506 0.00461306 0.08119206 0.00604 0.10107437 0.00191085 -0.05926891 0.01157635 0.0284292 -0.08671403 0.01851062 0.05745851 -0.06798992 0.02700593 0.00208116 -0.00829788 0.08901995 -0.00418414 -0.06217562 -0.07832154 0.02027107 0.06713033 0.04617893 0.05885412 -0.04505047 0.09581003 0.033753 -0.00888314 -0.07608356 -0.03729891 0.02724086 0.02371461 -0.01081131 -0.00809431 -0.04376922 -0.04656423 0.00886904 0.01995739]], shape=(1, 512), dtype=float32) Hope this helps. Happy Learning!
libvips cannot install due to wrong Python location
I'm trying to install libvips via Brew, but when i install i get this error about Python not being in the right location. Error message martins-mbp:~ martinnielsen$ brew install vips ==> Downloading http://www.vips.ecs.soton.ac.uk/supported/7.40/vips-7.40.10.tar.Already downloaded: /Library/Caches/Homebrew/vips-7.40.10.tar.gz ==> ./configure --prefix=/usr/local/Cellar/vips/7.40.10 ==> make check /usr/local/Cellar/gobject-introspection/1.42.0/bin/g-ir-scanner --add-include-path=. --namespace=Vips --nsversion=8.0 --libtool="/bin/sh ../libtool" --include=GObject-2.0 --library=libvips.la --warn-all --verbose --identifier-prefix=Vips --identifier-prefix=vips --symbol-prefix=vips --symbol-prefix=im --symbol-prefix=im_ --cflags-begin -I../libvips/include --cflags-end arithmetic/abs.c arithmetic/add.c arithmetic/arithmetic.c arithmetic/avg.c arithmetic/binary.c arithmetic/boolean.c arithmetic/complex.c arithmetic/deviate.c arithmetic/divide.c arithmetic/getpoint.c arithmetic/hist_find.c arithmetic/hist_find_indexed.c arithmetic/hist_find_ndim.c arithmetic/hough.c arithmetic/hough_circle.c arithmetic/hough_line.c arithmetic/invert.c arithmetic/linear.c arithmetic/math.c arithmetic/math2.c arithmetic/max.c arithmetic/measure.c arithmetic/min.c arithmetic/multiply.c arithmetic/nary.c arithmetic/profile.c arithmetic/project.c arithmetic/relational.c arithmetic/remainder.c arithmetic/round.c arithmetic/sign.c arithmetic/statistic.c arithmetic/stats.c arithmetic/subtract.c arithmetic/sum.c arithmetic/unary.c arithmetic/unaryconst.c cimg/cimg_dispatch.c colour/colour.c colour/colourspace.c colour/dE00.c colour/dE76.c colour/dECMC.c colour/float2rad.c colour/icc_transform.c colour/Lab2LabQ.c colour/Lab2LabS.c colour/Lab2LCh.c colour/Lab2XYZ.c colour/LabQ2Lab.c colour/LabQ2LabS.c colour/LabQ2sRGB.c colour/LabS2Lab.c colour/LabS2LabQ.c colour/LCh2Lab.c colour/LCh2UCS.c colour/rad2float.c colour/scRGB2sRGB.c colour/scRGB2XYZ.c colour/sRGB2scRGB.c colour/UCS2LCh.c colour/XYZ2Lab.c colour/XYZ2scRGB.c colour/XYZ2Yxy.c colour/Yxy2XYZ.c conversion/bandary.c conversion/bandbool.c conversion/bandjoin.c conversion/bandmean.c conversion/bandrank.c conversion/cache.c conversion/cast.c conversion/conversion.c conversion/copy.c conversion/embed.c conversion/extract.c conversion/falsecolour.c conversion/flatten.c conversion/flip.c conversion/gamma.c conversion/grid.c conversion/ifthenelse.c conversion/insert.c conversion/join.c conversion/msb.c conversion/recomb.c conversion/replicate.c conversion/rot.c conversion/rot45.c conversion/scale.c conversion/sequential.c conversion/subsample.c conversion/tilecache.c conversion/wrap.c conversion/zoom.c convolution/compass.c convolution/conv.c convolution/convolution.c convolution/convsep.c convolution/correlation.c convolution/fastcor.c convolution/gaussblur.c convolution/im_aconv.c convolution/im_aconvsep.c convolution/im_conv.c convolution/im_conv_f.c convolution/sharpen.c convolution/spcor.c create/black.c create/buildlut.c create/create.c create/eye.c create/fractsurf.c create/gaussmat.c create/gaussnoise.c create/grey.c create/identity.c create/im_benchmark.c create/invertlut.c create/logmat.c create/mask.c create/mask_butterworth.c create/mask_butterworth_band.c create/mask_butterworth_ring.c create/mask_fractal.c create/mask_gaussian.c create/mask_gaussian_band.c create/mask_gaussian_ring.c create/mask_ideal.c create/mask_ideal_band.c create/mask_ideal_ring.c create/other_dispatch.c create/point.c create/sines.c create/text.c create/tonelut.c create/xyz.c create/zone.c draw/draw.c draw/draw_circle.c draw/draw_flood.c draw/draw_image.c draw/draw_line.c draw/draw_mask.c draw/draw_rect.c draw/draw_smudge.c draw/drawink.c foreign/analyze2vips.c foreign/analyzeload.c foreign/csv.c foreign/csvload.c foreign/csvsave.c foreign/dzsave.c foreign/fits.c foreign/fitsload.c foreign/fitssave.c foreign/foreign.c foreign/jpeg2vips.c foreign/jpegload.c foreign/jpegsave.c foreign/magick2vips.c foreign/magickload.c foreign/matlab.c foreign/matload.c foreign/matrixload.c foreign/matrixsave.c foreign/openexr2vips.c foreign/openexrload.c foreign/openslide2vips.c foreign/openslideload.c foreign/pngload.c foreign/pngsave.c foreign/ppm.c foreign/ppmload.c foreign/ppmsave.c foreign/radiance.c foreign/radload.c foreign/radsave.c foreign/rawload.c foreign/rawsave.c foreign/tiff2vips.c foreign/tiffload.c foreign/tiffsave.c foreign/vips2jpeg.c foreign/vips2tiff.c foreign/vips2webp.c foreign/vipsload.c foreign/vipspng.c foreign/vipssave.c foreign/webp2vips.c foreign/webpload.c foreign/webpsave.c freqfilt/freqfilt.c freqfilt/freqmult.c freqfilt/fwfft.c freqfilt/invfft.c freqfilt/phasecor.c freqfilt/spectrum.c histogram/hist_cum.c histogram/hist_equal.c histogram/hist_ismonotonic.c histogram/hist_local.c histogram/hist_match.c histogram/hist_norm.c histogram/hist_plot.c histogram/hist_unary.c histogram/histogram.c histogram/maplut.c histogram/percent.c histogram/stdif.c iofuncs/base64.c iofuncs/buf.c iofuncs/buffer.c iofuncs/cache.c iofuncs/enumtypes.c iofuncs/error.c iofuncs/gate.c iofuncs/generate.c iofuncs/header.c iofuncs/image.c iofuncs/init.c iofuncs/mapfile.c iofuncs/memory.c iofuncs/object.c iofuncs/operation.c iofuncs/rect.c iofuncs/region.c iofuncs/semaphore.c iofuncs/sink.c iofuncs/sinkdisc.c iofuncs/sinkmemory.c iofuncs/sinkscreen.c iofuncs/system.c iofuncs/threadpool.c iofuncs/type.c iofuncs/util.c iofuncs/vector.c iofuncs/vips.c iofuncs/vipsmarshal.c iofuncs/window.c morphology/countlines.c morphology/hitmiss.c morphology/labelregions.c morphology/morph.c morphology/morphology.c morphology/rank.c mosaicing/global_balance.c mosaicing/im_avgdxdy.c mosaicing/im_chkpair.c mosaicing/im_clinear.c mosaicing/im_improve.c mosaicing/im_initialize.c mosaicing/im_lrcalcon.c mosaicing/im_lrmerge.c mosaicing/im_lrmosaic.c mosaicing/im_remosaic.c mosaicing/im_tbcalcon.c mosaicing/im_tbmerge.c mosaicing/im_tbmosaic.c mosaicing/match.c mosaicing/merge.c mosaicing/mosaic.c mosaicing/mosaic1.c mosaicing/mosaicing.c resample/affine.c resample/interpolate.c resample/quadratic.c resample/resample.c resample/shrink.c resample/similarity.c resample/transform.c video/im_video_test.c video/video_dispatch.c include/vips/basic.h include/vips/vips.h include/vips/object.h include/vips/image.h include/vips/error.h include/vips/foreign.h include/vips/interpolate.h include/vips/header.h include/vips/operation.h include/vips/enumtypes.h include/vips/arithmetic.h include/vips/conversion.h include/vips/type.h libvips.la --output Vips-8.0.gir /bin/sh: /usr/local/Cellar/gobject-introspection/1.42.0/bin/g-ir-scanner: /usr/local/opt/python/bin/python: bad interpreter: No such file or directory make[2]: *** [Vips-8.0.gir] Error 126 make[1]: *** [check-recursive] Error 1 make: *** [check-recursive] Error 1 READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting If reporting this issue please do so at (not Homebrew/homebrew): https://github.com/homebrew/homebrew-science/issues I looked for the folder /usr/local/opt/python/bin/python but i don't have it. If i do which Python in the Terminal i get /usr/bin/Python which i guess should be where the script should look for Python. Can i somehow alias the correct folder to allow libvips to build?
I fixed the error by installing python via homebrew aswell. So i did homebrew install python first and then brew install homebrew/science/vips --with-webp --with-graphicsmagick afterwards.